From: duplo Date: Sat, 25 Apr 2009 07:58:45 +0000 (+0000) Subject: Don't permit to use non ascii character in destination directory field. X-Git-Tag: 2.1.0~13 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=6a7f7153724fd0f4392ba94715e44ed643e661fb;p=bertos.git Don't permit to use non ascii character in destination directory field. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2669 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/wizard/BFolderPage.py b/wizard/BFolderPage.py index b0f71db8..0014a886 100644 --- a/wizard/BFolderPage.py +++ b/wizard/BFolderPage.py @@ -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):