Commit ec0af2cb2f6bdd60320f9fef855384843af1536f
1 parent
ef9b8c25
Exists in
master
and in
6 other branches
FIX: Error in the Windows XP 32 bits open directory with accent.
Showing
1 changed file
with
5 additions
and
2 deletions
Show diff stats
invesalius/gui/dialogs.py
... | ... | @@ -171,8 +171,11 @@ def ShowImportDirDialog(): |
171 | 171 | if dlg.ShowModal() == wx.ID_OK: |
172 | 172 | # GetPath returns in unicode, if a path has non-ascii characters a |
173 | 173 | # UnicodeEncodeError is raised. To avoid this, path is encoded in utf-8 |
174 | - path = dlg.GetPath().encode('utf-8') | |
175 | - | |
174 | + if sys.platform == "win32": | |
175 | + path = dlg.GetPath() | |
176 | + else: | |
177 | + path = dlg.GetPath().encode('utf-8') | |
178 | + | |
176 | 179 | # Only destroy a dialog after you're done with it. |
177 | 180 | dlg.Destroy() |
178 | 181 | os.chdir(current_dir) | ... | ... |