append -o to output path for 7zip. Fixes #1149

This commit is contained in:
clinton-hall 2016-12-24 08:05:11 +10:30
commit e96998a731

View file

@ -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