zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit a3030221c3bb3f3d59cedc6db83c679470fca417 (tree)
parent 29c32b3dc50218d15f779201e154d425fffcefeb
Author: Yorhel <git@yorhel.nl>
Date:   Fri, 25 Mar 2022 07:47:15 +0100

std.fs: Handle EINVAL from linux.getdents64

Fixes #11178

Diffstat:
Mlib/std/fs.zig | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/std/fs.zig b/lib/std/fs.zig @@ -605,7 +605,7 @@ pub const Dir = struct { .BADF => unreachable, // Dir is invalid or was opened without iteration ability .FAULT => unreachable, .NOTDIR => unreachable, - .INVAL => unreachable, + .INVAL => return error.Unexpected, // Linux may in some cases return EINVAL when reading /proc/$PID/net. else => |err| return os.unexpectedErrno(err), } if (rc == 0) return null;