Fixed file open problem

This commit is contained in:
itdominator 2021-12-05 21:42:26 -06:00
parent 2ddfe0a07d
commit aa984b6be4
2 changed files with 5 additions and 5 deletions

View File

@ -35,16 +35,16 @@ class Launcher:
else:
command = ["xdg-open", file]
self.execute(command)
self.execute(command, use_shell=False)
def execute(self, command, start_dir=os.getenv("HOME"), use_os_system=None):
def execute(self, command, start_dir=os.getenv("HOME"), use_os_system=None, use_shell=True):
self.logger.debug(command)
if use_os_system:
os.system(command)
else:
DEVNULL = open(os.devnull, 'w')
subprocess.Popen(command, cwd=start_dir, shell=True, start_new_session=True, stdout=DEVNULL, stderr=DEVNULL, close_fds=True)
subprocess.Popen(command, cwd=start_dir, shell=use_shell, start_new_session=True, stdout=DEVNULL, stderr=DEVNULL, close_fds=True)
def remux_video(self, hash, file):

View File

@ -110,7 +110,7 @@ class WindowMixin(TabMixin):
fileName = model[item][1]
dir = view.get_current_directory()
file = dir + "/" + fileName
file = f"{dir}/{fileName}"
if isdir(file):
view.set_path(file)
@ -120,7 +120,7 @@ class WindowMixin(TabMixin):
self.set_file_watcher(view)
self.set_bottom_labels(view)
else:
view.open_file_locally(file)
self.open_files()
except Exception as e:
self.display_message(self.error, f"{repr(e)}")