check is chp.exe exists. fixes #99

This commit is contained in:
Clinton Hall 2013-03-23 16:25:53 -07:00
parent 34357280be
commit a5be594abe

View file

@ -54,7 +54,10 @@ def extract(filePath, outputDestination):
Logger.error("EXTRACTOR: Could not find 7-zip, Exiting")
sys.exit(-1)
else:
cmd_7zip = [chplocation, sevenzipLocation, "x", "-y"]
if not os.path.exists(chplocation):
cmd_7zip = [sevenzipLocation, "x", "-y"]
else:
cmd_7zip = [chplocation, sevenzipLocation, "x", "-y"]
ext_7zip = [".rar",".zip",".tar.gz","tgz",".tar.bz2",".tbz",".tar.lzma",".tlz",".7z",".xz"]
EXTRACT_COMMANDS = dict.fromkeys(ext_7zip, cmd_7zip)
# Using unix