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

@@ -841,6 +841,7 @@ pub const Dir = struct {
w.STATUS.ACCESS_DENIED => return error.AccessDenied,
w.STATUS.PIPE_BUSY => return error.PipeBusy,
w.STATUS.OBJECT_PATH_SYNTAX_BAD => unreachable,
w.STATUS.OBJECT_NAME_COLLISION => return error.PathAlreadyExists,
else => return w.unexpectedStatus(rc),
}
}