| ... | @@ -4165,7 +4165,7 @@ fn dirRealPathFilePosix(userdata: ?*anyopaque, dir: Dir, sub_path: []const u8, o | ... | @@ -4165,7 +4165,7 @@ fn dirRealPathFilePosix(userdata: ?*anyopaque, dir: Dir, sub_path: []const u8, o |
| 4165 | }, | 4165 | }, |
| 4166 | } | 4166 | } |
| 4167 | }; | 4167 | }; |
| 4168 | errdefer posix.close(fd); | 4168 | defer posix.close(fd); |
| 4169 | return realPathPosix(current_thread, fd, out_buffer); | 4169 | return realPathPosix(current_thread, fd, out_buffer); |
| 4170 | } | 4170 | } |
| 4171 | | 4171 | |
| ... | @@ -4290,16 +4290,17 @@ fn realPathPosix(current_thread: *Thread, fd: posix.fd_t, out_buffer: []u8) File | ... | @@ -4290,16 +4290,17 @@ fn realPathPosix(current_thread: *Thread, fd: posix.fd_t, out_buffer: []u8) File |
| 4290 | try current_thread.checkCancel(); | 4290 | try current_thread.checkCancel(); |
| 4291 | continue; | 4291 | continue; |
| 4292 | }, | 4292 | }, |
| 4293 | else => |e| { | 4293 | .BADF => { |
| 4294 | current_thread.endSyscall(); | 4294 | current_thread.endSyscall(); |
| 4295 | switch (e) { | 4295 | return error.FileNotFound; |
| 4296 | .BADF => return error.FileNotFound, | 4296 | }, |
| 4297 | else => |err| return posix.unexpectedErrno(err), | 4297 | else => |err| { |
| 4298 | } | 4298 | current_thread.endSyscall(); |
| | 4299 | return posix.unexpectedErrno(err); |
| 4299 | }, | 4300 | }, |
| 4300 | } | 4301 | } |
| 4301 | } | 4302 | } |
| 4302 | const len = std.mem.indexOfScalar(u8, &k_file.path, 0) orelse k_file.path.len; | 4303 | const len = std.mem.findScalar(u8, &k_file.path, 0) orelse k_file.path.len; |
| 4303 | if (len == 0) return error.NameTooLong; | 4304 | if (len == 0) return error.NameTooLong; |
| 4304 | return len; | 4305 | return len; |
| 4305 | }, | 4306 | }, |