diff --git a/std/os/file.zig b/std/os/file.zig index 94b36fe3319eeb8919fa221ae983635020756128..94415a361d5d3f5134f8f8a42b6974991b22a2c5 100644 --- a/std/os/file.zig +++ b/std/os/file.zig @@ -253,7 +253,9 @@ pub const File = struct { }; } - return stat.mode; + // TODO: we should be able to cast u16 to ModeError!u32, making this + // explicit cast not necessary + return os.FileMode(stat.mode); } else if (is_windows) { return {}; } else {