Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SystemPathSeparator defined as / for Window #247

Open
05nelsonm opened this issue Dec 7, 2023 · 3 comments
Open

SystemPathSeparator defined as / for Window #247

05nelsonm opened this issue Dec 7, 2023 · 3 comments
Labels

Comments

@05nelsonm
Copy link

SystemPathSeparator is defined in nativeMain

@fzhinkin
Copy link
Collaborator

fzhinkin commented Dec 8, 2023

That was done intentionally as Windows should correctly handle both \ and / as path separators (/ are canonicalized to \) and using / as the separator seemed an easier option.
Are there any cases where it works incorrectly? Or it's mostly about SystemPathSeparator itself being non-canonical for Windows?

@05nelsonm
Copy link
Author

Completely understandable if it was internal, but it is a part of the public API. Anyone from commonMain relying on SystemPathSeparator would "assume" that it delegates to the actual system path separator (like Jvm and Js are doing).

If nativeMain is in conflict with the actual system's path separator, why not drop the expect/actual and define SystemPathSeparator in commonMain as /?

@fzhinkin
Copy link
Collaborator

fzhinkin commented Dec 8, 2023

I'll address the issue in scope of #241.

@fzhinkin fzhinkin added the fs label Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants