-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Ensure POSIX path normalizing behavior under NODERAWFS #22372
Ensure POSIX path normalizing behavior under NODERAWFS #22372
Conversation
I'm not sure how this solves the issues since surely Can you add |
Can you mention in the title or description that this is fix for NODERAWFS on windows which was broken by #18163 |
Avoids mangling `C:/tmp` to `C:\tmp`. Should be safe, the underlying Windows API can accept either the backslash or slash to separate directory and file components of a path. See: https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file Ensures `NODERAWFS` compatibility on Windows that was regressed since emscripten-core#18163.
76e6056
to
30def57
Compare
emscripten/src/library_noderawfs.js Lines 19 to 21 in cd097fb
Lines 1415 to 1419 in cd097fb
Lines 1357 to 1363 in cd097fb
Done. |
BTW, I'm not sure why the Windows CI actually did pass on #18163. I added |
When this line runs in linux will it actually create symlink in the real |
Looks like we were missing |
No, since the overwriting occurs later, a virtualized symlink is used. emscripten/src/library_noderawfs.js Lines 36 to 41 in cd097fb
|
If you want, I can add that in this PR to verify its correctness. |
Yup, that makes sense. We can verify the test actually runs. I will still send a PR to make all decorators use |
BTW, if windows accepts both slashes, why is this change needed? |
Great! I just pushed commit eb5869f.
Since the virtualized/in-memory file system relies on POSIX/UNIX-style separators. DetailsLine 55 in cd097fb
Line 195 in cd097fb
Line 199 in cd097fb
Line 244 in cd097fb
Line 572 in cd097fb
Line 695 in cd097fb
Line 699 in cd097fb
Line 1450 in cd097fb
Line 1533 in cd097fb
Line 1541 in cd097fb
(i.e. that's |
I guess we can/should revert this change too? |
Indeed, we should probably revert this too after PR #22393 lands. Sorry for the trouble caused, the good thing is that this found that decorator bug. :) |
This reverts commit 51f0346.
This reverts commit 51f0346.
Avoids mangling
C:/tmp
toC:\tmp
. Should be safe, the underlying Windows API can accept either the backslash or slash to separate directory and file components of a path.See: https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file
Ensures
NODERAWFS
compatibility on Windows that was regressed since #18163.