diff --git a/lib/std/debug/SelfInfo.zig b/lib/std/debug/SelfInfo.zig index 544cf0ac6ff4..7f07ea1e8b0e 100644 --- a/lib/std/debug/SelfInfo.zig +++ b/lib/std/debug/SelfInfo.zig @@ -1003,7 +1003,7 @@ fn readCoffDebugInfo(allocator: Allocator, coff_obj: *coff.Coff) !Module { di.dwarf = dwarf; } - const raw_path = try coff_obj.getPdbPath() orelse return di; + const raw_path = (coff_obj.getPdbPath() catch return error.InvalidDebugInfo) orelse return di; const path = blk: { if (fs.path.isAbsolute(raw_path)) { break :blk raw_path; diff --git a/lib/std/fs/Dir.zig b/lib/std/fs/Dir.zig index fab9679838b3..59e8734c0957 100644 --- a/lib/std/fs/Dir.zig +++ b/lib/std/fs/Dir.zig @@ -1353,7 +1353,7 @@ pub fn realpathW(self: Dir, pathname: []const u16, out_buffer: []u8) RealPathErr defer w.CloseHandle(h_file); var wide_buf: [w.PATH_MAX_WIDE]u16 = undefined; - const wide_slice = try w.GetFinalPathNameByHandle(h_file, .{}, &wide_buf); + const wide_slice = try w.GetFinalPathNameByHandle(h_file, .{ .volume_name = .Nt }, &wide_buf); var big_out_buf: [fs.max_path_bytes]u8 = undefined; const end_index = std.unicode.wtf16LeToWtf8(&big_out_buf, wide_slice); if (end_index > out_buffer.len)