diff --git a/src/common.py b/src/common.py index 94f1e79b5..284e47e67 100644 --- a/src/common.py +++ b/src/common.py @@ -185,16 +185,17 @@ def fetch_url(url): return None -def exec_command(executable=None, *parameters): +def exec_command(executable, *parameters): import os + command = [executable] + command.extend(parameters) if windows_check(): try: - os.startfile(parameters) + from subprocess import Popen + Popen(command) except: pass else: - command = [executable] - command.extend(parameters) try: os.WEXITSTATUS(os.system(command[0] + " \"%s\"" %command[1])) except OSError: diff --git a/src/interface.py b/src/interface.py index 34d954762..f9a0c1264 100644 --- a/src/interface.py +++ b/src/interface.py @@ -739,9 +739,9 @@ window, please enter your password")) torrent_path = self.manager.get_torrent_path(uid) if not common.windows_check(): file_manager = "xdg-open" - common.exec_command(file_manager, torrent_path) else: - common.exec_command(executable=None, parameters=torrent_path) + file_namager = "explorer.exe" + common.exec_command(file_manager, torrent_path) except KeyError: pass