Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/projManagement/Validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,12 @@ def validateNewproj(self, projDir):
print("Function: Validating New Project Information")

# Checking existence of project with same name
projName = os.path.basename(projDir)
if os.path.exists(projDir):
return "CHECKEXIST" # Project with name already exist
else:
# Check Proper name for project. It should not have space
if re.search(r"\s", projDir):
if re.search(r"\s", projName):
return "CHECKNAME"
else:
return "VALID"
Expand Down
4 changes: 3 additions & 1 deletion src/projManagement/newProject.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ def createProject(self, projName):
self.workspace = self.obj_appconfig.default_workspace['workspace']
# self.projName = self.projEdit.text()
# Remove leading and trailing space
self.projName = str(self.projName).rstrip().lstrip()
# self.projName = str(self.projName).rstrip().lstrip()
# Remove leading and trailing spaces AND replace internal spaces with underscores
self.projName = str(self.projName).strip().replace(" ", "_")

self.projDir = os.path.join(self.workspace, str(self.projName))

Expand Down