zig/lib/std/os
Ryan Liptak 3f9294c735 Windows: Fix TooManyParentDirs handling for paths that shouldn't be cwd-relative
Previously, a relative path like `..` would:
- Attempt to be normalized (i.e. remove . and .. without any path resolution), but would error with TooManyParentDirs
- This would make wToPrefixedFileW run it through `RtlGetFullPathName_U` to do the necessary path resolution, but `RtlGetFullPathName_U` always resolves relative paths relative to the CWD

Instead, when TooManyParentDirs occurs, we now look up the path of the passed in `dir` (if it's non-null) and append the relative path to it before giving it to `RtlGetFullPathName_U`. If `dir` is null, then we just give it RtlGetFullPathName_U directly and let it resolve it relative to the CWD.

Closes #16779
2023-08-11 18:58:40 -07:00
..
linux std: finish cleanup up asm 2023-07-31 03:49:21 -04:00
plan9 plan 9: filesystem support 2023-08-02 17:39:52 -04:00
uefi more UEFI alignment fixes 2023-07-20 12:46:33 -07:00
windows Windows: Fix TooManyParentDirs handling for paths that shouldn't be cwd-relative 2023-08-11 18:58:40 -07:00
linux.zig Merge pull request #16622 from jacobly0/cbe-asm-compat 2023-07-31 15:34:32 -07:00
plan9.zig Plan 9: add more features to std.os.plan9 2023-08-02 18:19:07 -04:00
test.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
uefi.zig std.os.uefi: use std.os.uefi.cc instead of .C as calling convention 2023-07-08 17:32:36 -04:00
wasi.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
windows.zig Windows: Fix TooManyParentDirs handling for paths that shouldn't be cwd-relative 2023-08-11 18:58:40 -07:00