std.os.windows.OpenFile: Handle FILE_IS_A_DIRECTORY status

Fixes #5533
master
Ryan Liptak 2020-06-04 15:31:16 -07:00 committed by Andrew Kelley
parent 95a5f6bf2d
commit f839d34baa
1 changed files with 1 additions and 0 deletions

View File

@ -182,6 +182,7 @@ pub fn OpenFile(sub_path_w: []const u16, options: OpenFileOptions) OpenError!HAN
.PIPE_BUSY => return error.PipeBusy,
.OBJECT_PATH_SYNTAX_BAD => unreachable,
.OBJECT_NAME_COLLISION => return error.PathAlreadyExists,
.FILE_IS_A_DIRECTORY => return error.IsDir,
else => return unexpectedStatus(rc),
}
}