]> xmof Git - DeDRM.git/commitdiff
Linux: Allow using ~ when specifying a wineprefix.
authorEli Schwartz <eschwartz93@gmail.com>
Sun, 22 Mar 2015 06:36:15 +0000 (01:36 -0500)
committerEli Schwartz <eschwartz93@gmail.com>
Wed, 12 Aug 2015 21:39:50 +0000 (17:39 -0400)
DeDRM_calibre_plugin/DeDRM_plugin/wineutils.py

index b54db8043a0b998e7f666309812a2edeb70c7a52..6d79c9bbbf68a922d783bc8a7bf87952724fe1c4 100644 (file)
@@ -26,6 +26,7 @@ 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 != "" and os.path.exists(wineprefix):
          cmdline = u"WINEPREFIX=\"{2}\" wine python.exe \"{0}\" \"{1}\"".format(scriptpath,outdirpath,wineprefix)
     else: