Do not allow creating project on existing path.

startup
Ben Niemann 2019-06-08 03:28:44 +02:00
parent b93807abb7
commit b1383d8387
1 changed files with 2 additions and 0 deletions

View File

@ -251,6 +251,8 @@ class NewProjectDialog(ui_base.CommonMixin, QtWidgets.QDialog):
self.__error.setVisible(True)
if not text:
self.__error.setText("Enter a valid project name.")
elif os.path.exists(self.projectPath()):
self.__error.setText("A project of this name already exists.")
else:
self.__create_button.setEnabled(True)
self.__error.setVisible(False)