| ... | @@ -3155,11 +3155,11 @@ pub fn chdir(dir_path: []const u8) ChangeCurDirError!void { | ... | @@ -3155,11 +3155,11 @@ pub fn chdir(dir_path: []const u8) ChangeCurDirError!void { |
| 3155 | pub fn chdirZ(dir_path: [*:0]const u8) ChangeCurDirError!void { | 3155 | pub fn chdirZ(dir_path: [*:0]const u8) ChangeCurDirError!void { |
| 3156 | if (builtin.os.tag == .windows) { | 3156 | if (builtin.os.tag == .windows) { |
| 3157 | var utf16_dir_path: [windows.PATH_MAX_WIDE]u16 = undefined; | 3157 | var utf16_dir_path: [windows.PATH_MAX_WIDE]u16 = undefined; |
| 3158 | const len = try std.unicode.utf8ToUtf16Le(utf16_dir_path[0..], dir_path); | 3158 | const len = try std.unicode.utf8ToUtf16Le(utf16_dir_path[0..], mem.span(dir_path)); |
| 3159 | if (len > utf16_dir_path.len) return error.NameTooLong; | 3159 | if (len > utf16_dir_path.len) return error.NameTooLong; |
| 3160 | return chdirW(utf16_dir_path[0..len]); | 3160 | return chdirW(utf16_dir_path[0..len]); |
| 3161 | } else if (builtin.os.tag == .wasi and !builtin.link_libc) { | 3161 | } else if (builtin.os.tag == .wasi and !builtin.link_libc) { |
| 3162 | return chdir(mem.sliceTo(dir_path, 0)); | 3162 | return chdir(mem.span(dir_path)); |
| 3163 | } | 3163 | } |
| 3164 | switch (errno(system.chdir(dir_path))) { | 3164 | switch (errno(system.chdir(dir_path))) { |
| 3165 | .SUCCESS => return, | 3165 | .SUCCESS => return, |