diff --git a/dedrm_src/wineutils.py b/dedrm_src/wineutils.py index 3a587e1..65435a2 100644 --- a/dedrm_src/wineutils.py +++ b/dedrm_src/wineutils.py @@ -27,7 +27,9 @@ def WineGetKeys(scriptpath, extension, wineprefix=""): if not os.path.exists(outdirpath): os.makedirs(outdirpath) - wineprefix = os.path.abspath(os.path.expanduser(os.path.expandvars(wineprefix))) + if wineprefix != "": + wineprefix = os.path.abspath(os.path.expanduser(os.path.expandvars(wineprefix))) + if wineprefix != "" and os.path.exists(wineprefix): cmdline = u"WINEPREFIX=\"{2}\" wine python.exe \"{0}\" \"{1}\"".format(scriptpath,outdirpath,wineprefix) else: