From 555aadc83e42fb4149dcc6042f2b472fbfb99fc6 Mon Sep 17 00:00:00 2001 From: shypike Date: Sat, 5 Dec 2015 16:07:56 +0100 Subject: [PATCH] Windows: convert explicit INI-path to Unicode. On Windows, the -f parameter passes an 8bit ASCII string instead of Unicode. --- SABnzbd.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SABnzbd.py b/SABnzbd.py index 549b3b5..2d4f609 100755 --- a/SABnzbd.py +++ b/SABnzbd.py @@ -760,6 +760,8 @@ def evaluate_inipath(path): but not a leading dot. foldername is enough, the standard name will be appended. """ + if sabnzbd.WIN32: + path = unicoder(path) path = os.path.normpath(os.path.abspath(path)) inipath = os.path.join(path, DEF_INI_FILE) if os.path.isdir(path): @@ -1283,7 +1285,7 @@ def main(): cpumodel = getcpu() # Linux only if cpumodel: logging.debug('CPU model name is %s', cpumodel) - + # OSX 10.5 I/O priority setting if sabnzbd.DARWIN: logging.info('[osx] IO priority setting')