Skip to content

Commit 5db9424

Browse files
committed
1 parent bf84f4e commit 5db9424

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/libstd/sys/windows/c.rs

+1
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ pub const ERROR_ACCESS_DENIED: DWORD = 5;
181181
pub const ERROR_INVALID_HANDLE: DWORD = 6;
182182
pub const ERROR_NO_MORE_FILES: DWORD = 18;
183183
pub const ERROR_HANDLE_EOF: DWORD = 38;
184+
pub const ERROR_FILE_EXISTS: DWORD = 80;
184185
pub const ERROR_BROKEN_PIPE: DWORD = 109;
185186
pub const ERROR_CALL_NOT_IMPLEMENTED: DWORD = 120;
186187
pub const ERROR_INSUFFICIENT_BUFFER: DWORD = 122;

src/libstd/sys/windows/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ pub fn decode_error_kind(errno: i32) -> ErrorKind {
6868
match errno as c::DWORD {
6969
c::ERROR_ACCESS_DENIED => return ErrorKind::PermissionDenied,
7070
c::ERROR_ALREADY_EXISTS => return ErrorKind::AlreadyExists,
71+
c::ERROR_FILE_EXISTS => return ErrorKind::AlreadyExists,
7172
c::ERROR_BROKEN_PIPE => return ErrorKind::BrokenPipe,
7273
c::ERROR_FILE_NOT_FOUND => return ErrorKind::NotFound,
7374
c::ERROR_PATH_NOT_FOUND => return ErrorKind::NotFound,

0 commit comments

Comments
 (0)