diff options
| author | Ryan Liptak <squeek502@hotmail.com> | 2024-02-13 16:56:50 -0800 |
|---|---|---|
| committer | Ryan Liptak <squeek502@hotmail.com> | 2024-02-24 14:05:24 -0800 |
| commit | 68b87918df9ad82cf3161f323c55f2e238319922 (patch) | |
| tree | c802aea2b636236f767e6c1cdd864f01c2b47d15 /src/Module.zig | |
| parent | f6b6b8a4ae4780f21c45824d34d8e14b3c3b5037 (diff) | |
| download | zig-68b87918df9ad82cf3161f323c55f2e238319922.tar.gz zig-68b87918df9ad82cf3161f323c55f2e238319922.zip | |
Fix handling of Windows (WTF-16) and WASI (UTF-8) paths
Windows paths now use WTF-16 <-> WTF-8 conversion everywhere, which is lossless. Previously, conversion of ill-formed UTF-16 paths would either fail or invoke illegal behavior.
WASI paths must be valid UTF-8, and the relevant function calls have been updated to handle the possibility of failure due to paths not being encoded/encodable as valid UTF-8.
Closes #18694
Closes #1774
Closes #2565
Diffstat (limited to 'src/Module.zig')
| -rw-r--r-- | src/Module.zig | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Module.zig b/src/Module.zig index 2f32fa8197..c27b8ea4be 100644 --- a/src/Module.zig +++ b/src/Module.zig @@ -2662,6 +2662,7 @@ pub fn astGenFile(mod: *Module, file: *File) !void { }) catch |err| switch (err) { error.NotDir => unreachable, // no dir components error.InvalidUtf8 => unreachable, // it's a hex encoded name + error.InvalidWtf8 => unreachable, // it's a hex encoded name error.BadPathName => unreachable, // it's a hex encoded name error.NameTooLong => unreachable, // it's a fixed size name error.PipeBusy => unreachable, // it's not a pipe |
