From f2dfc7cb500fe55f39b0f084c35d964b31dc3e71 Mon Sep 17 00:00:00 2001 From: Joey Payne Date: Sat, 20 Dec 2014 14:35:33 +1300 Subject: [PATCH] Fixed error with parsing directories in windows. --- command_line.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/command_line.py b/command_line.py index 3bdb67b..d56a2fd 100644 --- a/command_line.py +++ b/command_line.py @@ -37,7 +37,10 @@ else: CWD = os.getcwd() TEMP_DIR = get_temp_dir() -DEFAULT_DOWNLOAD_PATH = os.path.join(CWD, 'files', 'downloads') +DEFAULT_DOWNLOAD_PATH = os.path.join(CWD, + 'files', + 'downloads').replace('\\', + '\\\\') try: os.makedirs(DEFAULT_DOWNLOAD_PATH) except: @@ -587,6 +590,8 @@ class CommandBase(object): def convert_val_to_str(self, val): if isinstance(val, (list, tuple)): return ', '.join(val) + elif isinstance(val, basestring): + val = str(val).replace('\\', '\\\\') return str(val).replace(self.project_dir()+os.path.sep, '') def export(self):