82 self.trUtf8("Add Sub-repository"), |
82 self.trUtf8("Add Sub-repository"), |
83 os.path.join(self.__projectPath, self.pathEdit.text()), |
83 os.path.join(self.__projectPath, self.pathEdit.text()), |
84 E5FileDialog.Options(E5FileDialog.Option(0))) |
84 E5FileDialog.Options(E5FileDialog.Option(0))) |
85 |
85 |
86 if path: |
86 if path: |
|
87 path = Utilities.toNativeSeparators(path) |
87 if path.startswith(self.__projectPath): |
88 if path.startswith(self.__projectPath): |
88 path = path.replace(self.__projectPath, "")[1:] |
89 path = path.replace(self.__projectPath, "")[1:] |
89 self.pathEdit.setText(Utilities.toNativeSeparators(path)) |
90 self.pathEdit.setText(path) |
90 else: |
91 else: |
91 E5MessageBox.critical(self, |
92 E5MessageBox.critical(self, |
92 self.trUtf8("Add Sub-repository"), |
93 self.trUtf8("Add Sub-repository"), |
93 self.trUtf8("""The sub-repository path must be inside""" |
94 self.trUtf8("""The sub-repository path must be inside""" |
94 """ the project.""")) |
95 """ the project.""")) |