diff --git a/library/std/src/sys/windows/mod.rs b/library/std/src/sys/windows/mod.rs index 57a25a0f30a..6d97bf42f6f 100644 --- a/library/std/src/sys/windows/mod.rs +++ b/library/std/src/sys/windows/mod.rs @@ -71,7 +71,8 @@ pub fn decode_error_kind(errno: i32) -> ErrorKind { c::ERROR_FILE_NOT_FOUND => return NotFound, c::ERROR_PATH_NOT_FOUND => return NotFound, c::ERROR_NO_DATA => return BrokenPipe, - c::ERROR_INVALID_PARAMETER | c::ERROR_INVALID_NAME => return InvalidInput, + c::ERROR_INVALID_NAME => return FilenameInvalid, + c::ERROR_INVALID_PARAMETER => return InvalidInput, c::ERROR_NOT_ENOUGH_MEMORY | c::ERROR_OUTOFMEMORY => return OutOfMemory, c::ERROR_SEM_TIMEOUT | c::WAIT_TIMEOUT