-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
std.process.Child: fix double path normalization in spawnWindows #24562
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
base: master
Are you sure you want to change the base?
std.process.Child: fix double path normalization in spawnWindows #24562
Conversation
be3c8b3
to
6019633
Compare
besides simply being redundant work, the now removed normalize call would cause spawn to errantly fail (BadPath) when passing a relative path which traversed 'above' the current working directory. This case is already handled by leaving normalization to the windows.wToPrefixedFileW call in windowsCreateProcessPathExt
Also check that FileNotFound is consistently returned when the path is missing. The new `run_relative` step will test spawning paths like: child_path: ../84385e7e669db0967d7a42765011dbe0/child missing_child_path: ../84385e7e669db0967d7a42765011dbe0/child_intentionally_missing
6019633
to
0f41063
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good!
For context to those reviewing, the normalizePath
calls that are being removed were an artifact of the Windows ChildProcess
rework in #13993 coming before #15768 which made the normalizePath
calls obsolete.
This PR removes the obsolete normalization and adds tests to check that behavior didn't regress.
besides simply being redundant work, the now removed normalize call would cause spawn to errantly fail (BadPath) when passing a relative path which traversed 'above' the current working directory. This case is already handled by leaving normalization to the windows.wToPrefixedFileW call in windowsCreateProcessPathExt