Fixed error with parsing directories in windows.
This commit is contained in:
parent
1e4a25419e
commit
6c0b0e54a3
1 changed files with 6 additions and 1 deletions
|
|
@ -37,7 +37,10 @@ else:
|
||||||
CWD = os.getcwd()
|
CWD = os.getcwd()
|
||||||
|
|
||||||
TEMP_DIR = get_temp_dir()
|
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:
|
try:
|
||||||
os.makedirs(DEFAULT_DOWNLOAD_PATH)
|
os.makedirs(DEFAULT_DOWNLOAD_PATH)
|
||||||
except:
|
except:
|
||||||
|
|
@ -587,6 +590,8 @@ class CommandBase(object):
|
||||||
def convert_val_to_str(self, val):
|
def convert_val_to_str(self, val):
|
||||||
if isinstance(val, (list, tuple)):
|
if isinstance(val, (list, tuple)):
|
||||||
return ', '.join(val)
|
return ', '.join(val)
|
||||||
|
elif isinstance(val, basestring):
|
||||||
|
val = str(val).replace('\\', '\\\\')
|
||||||
return str(val).replace(self.project_dir()+os.path.sep, '')
|
return str(val).replace(self.project_dir()+os.path.sep, '')
|
||||||
|
|
||||||
def export(self):
|
def export(self):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue