From ce8d4ea23a71650cac78f436226009f03a883df5 Mon Sep 17 00:00:00 2001 From: Anup Kumar Pandey Date: Wed, 4 Jun 2025 08:57:05 +0000 Subject: Update Validation.py --- src/projManagement/Validation.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/projManagement/Validation.py b/src/projManagement/Validation.py index 5f239163..fc97b87a 100644 --- a/src/projManagement/Validation.py +++ b/src/projManagement/Validation.py @@ -61,8 +61,8 @@ class Validation: :projDir => Contains path of the new projDir created @return - :"CHECKEXIST" => If smae project name folder exists - :"CHECKNAME" => If space is there in name + :"CHECKEXIST" => If same project name folder exists + :"CHECKNAME" => If space is there in project name :"VALID" => If valid project name given """ print("Function: Validating New Project Information") @@ -72,7 +72,9 @@ class Validation: return "CHECKEXIST" # Project with name already exist else: # Check Proper name for project. It should not have space - if re.search(r"\s", projDir): + # Extract only the project name (basename) from the full path + projName = os.path.basename(projDir) + if re.search(r"\s", projName): return "CHECKNAME" else: return "VALID" @@ -219,4 +221,4 @@ class Validation: return True print("Last line not found:", last_line) - return False + return false -- cgit