add missing error code handling on Windows

This commit is contained in:
Andrew Kelley
2019-11-30 16:58:32 -05:00
parent 413f9a5cfc
commit 034ccb4e4e
4 changed files with 9 additions and 2 deletions

View File

@@ -228,6 +228,7 @@ pub const File = struct {
windows.STATUS.SUCCESS => {},
windows.STATUS.BUFFER_OVERFLOW => {},
windows.STATUS.INVALID_PARAMETER => unreachable,
windows.STATUS.ACCESS_DENIED => return error.AccessDenied,
else => return windows.unexpectedStatus(rc),
}
return Stat{