X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=wizard%2FBFolderPage.py;h=3b34f14af6e5bcbf4619d18e6866b8a24c53b4ef;hb=402db875d587a89e87e545883514dca50bc5ca54;hp=b0f71db882d63aa72d806aa1a2d5574b31c463c6;hpb=6dfcd7d3f0ba06e414d6062d09658b57f0383c69;p=bertos.git diff --git a/wizard/BFolderPage.py b/wizard/BFolderPage.py index b0f71db8..3b34f14a 100644 --- a/wizard/BFolderPage.py +++ b/wizard/BFolderPage.py @@ -61,6 +61,7 @@ class BFolderPage(BWizardPage): self.setDefaultFolder(self._destination_folder) if self.pageContent.projectPath.text() != "None": self.setProjectInfo("PROJECT_PATH", unicode(self.pageContent.projectPath.text())) + self.setProjectInfo("PROJECT_NAME", os.path.basename(unicode(self.pageContent.projectPath.text()))) return True else: return False @@ -103,7 +104,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):