From 6a7f7153724fd0f4392ba94715e44ed643e661fb Mon Sep 17 00:00:00 2001 From: duplo Date: Sat, 25 Apr 2009 07:58:45 +0000 Subject: [PATCH] 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 --- wizard/BFolderPage.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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): -- 2.25.1