Skip to content

fix: resolve platform-dependent paths and OS-specific permissions (Issue #3)#16

Closed
PratyushNayak99 wants to merge 1 commit intoEAPD-DRB:mainfrom
PratyushNayak99:feature/3-dynamic-pathing
Closed

fix: resolve platform-dependent paths and OS-specific permissions (Issue #3)#16
PratyushNayak99 wants to merge 1 commit intoEAPD-DRB:mainfrom
PratyushNayak99:feature/3-dynamic-pathing

Conversation

@PratyushNayak99
Copy link

@PratyushNayak99 PratyushNayak99 commented Feb 23, 2026

Description

This PR refactors the backend to eliminate platform-dependent directory resolution and permission handling, aligning with the project's platform-independence goal.

  • Replaced legacy os.path.abspath directory mapping in API/app.py and Config.py with dynamic pathlib routing anchored to __file__.
  • Wrapped the Unix-specific os.chmod(..., 0o777) command in an OS-agnostic platform.system() check to prevent host system crashes on strict Linux/Windows environments.

Related Issue

Addresses #3

Validation Evidence

  • Tested locally on a modern Linux environment (Fedora).
  • Backend successfully boots from any working directory without FileNotFoundError.
  • Bypasses PermissionError during DATA_STORAGE initialization.
image image Screenshot_23-Feb_21-15-40_25588

@SeaCelo
Copy link
Collaborator

SeaCelo commented Feb 27, 2026

Thanks for this contribution @PratyushNayak99. The path anchoring approach you implemented here has been incorporated into the mac-port branch, which landed a broader cross-platform overhaul covering these same files.

Closing as superseded. Your work helped inform the direction. Appreciate the effort.

@SeaCelo SeaCelo closed this Feb 27, 2026
@PratyushNayak99
Copy link
Author

Thanks for this contribution @PratyushNayak99. The path anchoring approach you implemented here has been incorporated into the mac-port branch, which landed a broader cross-platform overhaul covering these same files.

Closing as superseded. Your work helped inform the direction. Appreciate the effort.

That makes total sense! I'm really glad my path anchoring approach was helpful in informing the broader mac-port overhaul. Looking forward to pulling that branch down and testing out the full cross-platform implementation. Thanks for the review, @SeaCelo

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.

2 participants