mirror of
https://github.com/k4yt3x/video2x.git
synced 2025-01-30 15:48:13 +00:00
made all drivers change cwd to binary's parent directory to resolve fnf issues
This commit is contained in:
parent
986619165f
commit
a0745e2196
@ -84,6 +84,10 @@ class WrapperMain:
|
||||
height {int} -- output video height
|
||||
"""
|
||||
|
||||
# change the working directory to the binary's parent directory
|
||||
# so the binary can find shared object files and other files
|
||||
os.chdir(pathlib.Path(self.driver_settings['path']).parent)
|
||||
|
||||
# overwrite config file settings
|
||||
self.driver_settings['input'] = input_file
|
||||
self.driver_settings['output'] = output_file
|
||||
|
@ -65,6 +65,10 @@ class WrapperMain:
|
||||
ratio {int} -- output video ratio
|
||||
"""
|
||||
|
||||
# change the working directory to the binary's parent directory
|
||||
# so the binary can find shared object files and other files
|
||||
os.chdir(pathlib.Path(self.driver_settings['path']).parent)
|
||||
|
||||
# overwrite config file settings
|
||||
self.driver_settings['i'] = input_directory
|
||||
self.driver_settings['o'] = output_directory
|
||||
|
@ -66,6 +66,10 @@ class WrapperMain:
|
||||
ratio {int} -- output video ratio
|
||||
"""
|
||||
|
||||
# change the working directory to the binary's parent directory
|
||||
# so the binary can find shared object files and other files
|
||||
os.chdir(pathlib.Path(self.driver_settings['path']).parent)
|
||||
|
||||
# overwrite config file settings
|
||||
self.driver_settings['i'] = input_directory
|
||||
self.driver_settings['o'] = output_directory
|
||||
|
@ -73,6 +73,10 @@ class WrapperMain:
|
||||
""" start upscaling process
|
||||
"""
|
||||
|
||||
# change the working directory to the binary's parent directory
|
||||
# so the binary can find shared object files and other files
|
||||
os.chdir(pathlib.Path(self.driver_settings['path']).parent)
|
||||
|
||||
# overwrite config file settings
|
||||
self.driver_settings['input_path'] = input_directory
|
||||
self.driver_settings['output_path'] = output_directory
|
||||
|
@ -82,8 +82,8 @@ class WrapperMain:
|
||||
threads {int} -- number of threads
|
||||
"""
|
||||
|
||||
# waifu2x-converter-cpp cannot fine libw2xc.so under Linux
|
||||
# if the working directory is not waifu2x-converter-cpp's directory
|
||||
# change the working directory to the binary's parent directory
|
||||
# so the binary can find shared object files and other files
|
||||
os.chdir(pathlib.Path(self.driver_settings['path']).parent)
|
||||
|
||||
# overwrite config file settings
|
||||
|
@ -69,6 +69,10 @@ class WrapperMain:
|
||||
ratio {int} -- output video ratio
|
||||
"""
|
||||
|
||||
# change the working directory to the binary's parent directory
|
||||
# so the binary can find shared object files and other files
|
||||
os.chdir(pathlib.Path(self.driver_settings['path']).parent)
|
||||
|
||||
# overwrite config file settings
|
||||
self.driver_settings['i'] = input_directory
|
||||
self.driver_settings['o'] = output_directory
|
||||
|
Loading…
Reference in New Issue
Block a user