Skip to content

Commit cc94079

Browse files
committed
Map ERROR_INVALID_NAME to FilenameInvalid
1 parent 755e475 commit cc94079

File tree

1 file changed

+2
-1
lines changed
  • library/std/src/sys/windows

1 file changed

+2
-1
lines changed

library/std/src/sys/windows/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ pub fn decode_error_kind(errno: i32) -> ErrorKind {
7171
c::ERROR_FILE_NOT_FOUND => return NotFound,
7272
c::ERROR_PATH_NOT_FOUND => return NotFound,
7373
c::ERROR_NO_DATA => return BrokenPipe,
74-
c::ERROR_INVALID_PARAMETER | c::ERROR_INVALID_NAME => return InvalidInput,
74+
c::ERROR_INVALID_NAME => return FilenameInvalid,
75+
c::ERROR_INVALID_PARAMETER => return InvalidInput,
7576
c::ERROR_NOT_ENOUGH_MEMORY | c::ERROR_OUTOFMEMORY => return OutOfMemory,
7677
c::ERROR_SEM_TIMEOUT
7778
| c::WAIT_TIMEOUT

0 commit comments

Comments
 (0)