Don't permit to use non ascii character in destination directory field.
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Sat, 25 Apr 2009 07:58:45 +0000 (07:58 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Sat, 25 Apr 2009 07:58:45 +0000 (07:58 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2669 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/BFolderPage.py

index b0f71db882d63aa72d806aa1a2d5574b31c463c6..0014a886056c0efa138bd630a85275de9fbe0ecb 100644 (file)
@@ -103,7 +103,12 @@ class BFolderPage(BWizardPage):
         """
         Slot called when the project folder is changed manually by the user.
         """
-        self._destination_folder = unicode(QDir.toNativeSeparators(directory))
+        try:
+            directory = unicode(directory).encode("ascii")
+        except UnicodeEncodeError:
+            directory = self._destination_folder
+            self.pageContent.directoryEdit.setText(directory)
+        self._destination_folder = directory
         self.setProjectPath()
 
     def selectDirectory(self):