Skip to content

Fix project creation failing when workspace path has spaces#514

Open
bhavyabhardwaj001 wants to merge 1 commit into
FOSSEE:masterfrom
bhavyabhardwaj001:fix/project-name-whitespace
Open

Fix project creation failing when workspace path has spaces#514
bhavyabhardwaj001 wants to merge 1 commit into
FOSSEE:masterfrom
bhavyabhardwaj001:fix/project-name-whitespace

Conversation

@bhavyabhardwaj001
Copy link
Copy Markdown

Closes #478

Purpose

Project creation fails on Windows when the workspace path contains spaces.
The current validation incorrectly checks the full project path instead of just the project name, causing valid project names to be rejected.

Approach

  • Extracted the project name from the full path using os.path.basename()
  • Applied whitespace validation only on the project name instead of the full directory path
  • Preserved existing behavior for invalid project names containing spaces

Changes Made

  • Updated validation logic in Validation.py
  • Replaced whitespace check on projDir with check on extracted project name (projName)
  • Added basename extraction before validation

Impact

  • Fixes incorrect rejection of valid project names when workspace path contains spaces
  • Maintains restriction on project names containing spaces
  • Improves usability for Windows users with spaced directory paths

Verification

  • Workspace path contains spaces + valid project name → project created successfully
  • Project name contains spaces → correctly rejected
  • Normal project creation flow → unaffected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New project creation incorrectly rejects valid names on Windows when workspace path contains spaces

1 participant