Fixed some unicode path issues with exporting.

This commit is contained in:
Joey Payne 2015-11-25 15:50:45 -07:00
commit af56701b4e
2 changed files with 22 additions and 12 deletions

View file

@ -19,7 +19,17 @@ def get_temp_dir():
return tempfile.gettempdir()
def path_join(base, *rest):
rpath = u'/'.join(rest)
try:
base = base.decode('utf-8')
except UnicodeEncodeError:
base = unicode(base)
new_rest = []
for i in xrange(len(rest)):
try:
new_rest.append(rest[i].decode('utf-8'))
except UnicodeEncodeError:
new_rest.append(unicode(rest[i]))
rpath = u'/'.join(new_rest)
if os.path.isabs(rpath):
return rpath
else: