fix: replace hardcoded Windows path separators with os.sep (#34)#35
Merged
SeaCelo merged 1 commit intoEAPD-DRB:mac-portfrom Feb 26, 2026
Merged
Conversation
Collaborator
|
Retargeted to mac-port per the macOS integration track: #51. |
10 tasks
Closed
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #34
Summary
Replaces all hardcoded Windows-style backslash path separators (
'\\') withos.sepfrom the Python standard library in the S3 upload logic.This is a non-breaking fix that advances the project's stated goal of platform-independence.
Changes
API/Classes/Base/SyncS3.pyuploadSync()prefixparameter changed from'\\'toos.sepuploadSync()fileName.replace('\\', '/')→fileName.replace(os.sep, '/')updateSync()localFile.replace('\\', '/')→localFile.replace(os.sep, '/')API/Routes/Upload/UploadRoute.pyupload_dir()prefixparameter changed from'\\'toos.sepupload_dir()fileName.replace('\\', '/')→fileName.replace(os.sep, '/')Notes
osis already imported in both files — zero new dependencies introduced.os.sepevaluates to'\\'on Windows, so existing Windows behaviour is completely unchanged.os.sepcorrectly evaluates to'/', fixing silent failures in S3 path construction on those platforms.docs/ARCHITECTURE.md:Testing
os.sepresolves to'\\'on Windows (behaviour preserved).startswith(prefix)andreplace(prefix, "", 1)behaves identically whenprefix=os.sep.