Fixed file open problem

This commit is contained in:
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):