X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=wizard%2FBFolderPage.py;h=e1af7e3278f8db5cbdb00de0675b4f8f67b3ba10;hb=e80b8410edc8e74e94662722194d1cfddbb19ec5;hp=956349ecf51f3a6b8e18af7e42006676207ceb17;hpb=0822b23b4622e7272b79b81a70963293641147af;p=bertos.git diff --git a/wizard/BFolderPage.py b/wizard/BFolderPage.py index 956349ec..e1af7e32 100644 --- a/wizard/BFolderPage.py +++ b/wizard/BFolderPage.py @@ -44,14 +44,14 @@ class BFolderPage(BWizardPage): self._setProjectPath() def _directoryChanged(self, directory): - self._destinationFolder = str(directory) + self._destinationFolder = str(QDir.toNativeSeparators(directory)) self._setProjectPath() def _setProjectPath(self): if self._destinationFolder != "" and self._projectName <> "": if not self._destinationFolder.endswith(os.sep): - self._destinationFolder += os.sep - self.pageContent.projectPath.setText(self._destinationFolder + self._projectName) + self._destinationFolder += "/" + self.pageContent.projectPath.setText(QDir.toNativeSeparators(self._destinationFolder + self._projectName)) if os.path.exists(self._destinationFolder + self._projectName): self.pageContent.warningLabel.setVisible(True) self.pageContent.warningLabel.setText(self.tr("Warning: the selected directory exists, \ @@ -67,7 +67,7 @@ class BFolderPage(BWizardPage): def _selectDirectory(self): directory = unicode(QFileDialog.getExistingDirectory(self, self.tr("Open Directory"), "", QFileDialog.ShowDirsOnly)) - if len(directory) == "": + if len(directory) > 0: self.pageContent.directoryEdit.setText(directory) def isComplete(self):