From e96998a7310db57cbee8077ac242bdf2181b90ba Mon Sep 17 00:00:00 2001 From: clinton-hall Date: Sat, 24 Dec 2016 08:05:11 +1030 Subject: [PATCH] append -o to output path for 7zip. Fixes #1149 --- core/extractor/extractor.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/extractor/extractor.py b/core/extractor/extractor.py index ed887187..227f10d3 100644 --- a/core/extractor/extractor.py +++ b/core/extractor/extractor.py @@ -112,7 +112,10 @@ def extract(filePath, outputDestination): try: # now works same for nt and *nix info = None - cmd.append(filePath) # add filePath to final cmd arg. + if "7z" in cmd[0] or "7z" in cmd[1]: + cmd.append("-o" + filePath) # add filePath with "-o" argument to prevent absolute path error. + else: + cmd.append(filePath) # add filePath to final cmd arg. if platform.system() == 'Windows': info = subprocess.STARTUPINFO() info.dwFlags |= subprocess.STARTF_USESHOWWINDOW