From a20302d4bc15a42f5cf722d713cc6f7d53bd0223 Mon Sep 17 00:00:00 2001 From: clinton-hall Date: Thu, 9 Jan 2014 19:52:27 +1030 Subject: [PATCH] stop ascii replace if on windows. fixes #235 --- autoProcess/nzbToMediaUtil.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoProcess/nzbToMediaUtil.py b/autoProcess/nzbToMediaUtil.py index e5218247..b8a51b7a 100644 --- a/autoProcess/nzbToMediaUtil.py +++ b/autoProcess/nzbToMediaUtil.py @@ -325,12 +325,12 @@ def converto_to_ascii(nzbName, dirName): return nzbName, dirName config.read(configFilename) ascii_convert = int(config.get("ASCII", "convert")) - if ascii_convert == 0: # just return if we don't need to wake anything. + if ascii_convert == 0 or os.name == 'nt': # just return if we don't want to convert or on windows os and "\" is replaced!. return nzbName, dirName nzbName2 = str(nzbName.decode('ascii', 'replace').replace(u'\ufffd', '_')) dirName2 = str(dirName.decode('ascii', 'replace').replace(u'\ufffd', '_')) - if dirName != nzbName2: + if dirName != dirName2: Logger.info("Renaming directory:%s to: %s.", dirName, nzbName2) shutil.move(dirName, nzbName2) for dirpath, dirnames, filesnames in os.walk(dirName2):