From: batt Date: Tue, 24 Mar 2009 10:49:29 +0000 (+0000) Subject: Remove the trailing separator. X-Git-Tag: 2.1.0~275 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=e312e0e25be4b0abddfa466770e0108d84437b82;p=bertos.git Remove the trailing separator. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2407 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/wizard/BVersionPage.py b/wizard/BVersionPage.py index bdd14cba..bd78fe01 100644 --- a/wizard/BVersionPage.py +++ b/wizard/BVersionPage.py @@ -64,8 +64,12 @@ class BVersionPage(BWizardPage): def isComplete(self): if self.pageContent.versionList.currentRow() != -1: - self._projectInfoStore("SOURCES_PATH", qvariant_converter.getString(self.pageContent.versionList.currentItem().data(Qt.UserRole))) - return True + # Remove trailing slash + sources_path = qvariant_converter.getString(self.pageContent.versionList.currentItem().data(Qt.UserRole)) + if sources_path.endswith(os.sep): + sources_path = sources_path[:-1] + self._projectInfoStore("SOURCES_PATH", sources_path) + return True else: return False @@ -87,4 +91,4 @@ class BVersionPage(BWizardPage): def rowChanged(self): self.emit(SIGNAL("completeChanged()")) - \ No newline at end of file +