7150: crash on backup or export

svn: r23367
This commit is contained in:
Paul Franklin 2013-10-22 16:53:10 +00:00
parent bf6901e6ed
commit b91765d462

View File

@ -1304,6 +1304,7 @@ class ViewManager(CLIManager):
basefile = file_entry.get_text() basefile = file_entry.get_text()
basefile = basefile.replace("/", r"-") basefile = basefile.replace("/", r"-")
filename = os.path.join(path_entry.get_text(), basefile) filename = os.path.join(path_entry.get_text(), basefile)
if sys.version_info[0] < 3:
filename = filename.encode(glocale.getfilesystemencoding()) filename = filename.encode(glocale.getfilesystemencoding())
if os.path.exists(filename): if os.path.exists(filename):
sfilename = get_unicode_path_from_env_var(filename) sfilename = get_unicode_path_from_env_var(filename)