7150: crash on backup or export

svn: r23366
This commit is contained in:
Paul Franklin 2013-10-22 16:52:53 +00:00
parent 47b9144ed1
commit 841f5c261b

View File

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