From f2190a67558a6f480dd24ea53354bd4735ab424a Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Sun, 22 Mar 2015 01:36:15 -0500 Subject: [PATCH] Linux: Allow using ~ when specifying a wineprefix. --- DeDRM_calibre_plugin/DeDRM_plugin/wineutils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/DeDRM_calibre_plugin/DeDRM_plugin/wineutils.py b/DeDRM_calibre_plugin/DeDRM_plugin/wineutils.py index b54db80..6d79c9b 100644 --- a/DeDRM_calibre_plugin/DeDRM_plugin/wineutils.py +++ b/DeDRM_calibre_plugin/DeDRM_plugin/wineutils.py @@ -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: