windows: Map ERROR_INVALID_NAME as InvalidInput

This commit is contained in:
Yuki Okushi 2021-11-17 03:18:15 +09:00
parent 56cd04af5c
commit 1115f15e1c
No known key found for this signature in database
GPG Key ID: DABA5B072961C18A

View File

@ -71,7 +71,7 @@ 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 => return InvalidInput,
c::ERROR_INVALID_PARAMETER | c::ERROR_INVALID_NAME => return InvalidInput,
c::ERROR_NOT_ENOUGH_MEMORY | c::ERROR_OUTOFMEMORY => return OutOfMemory,
c::ERROR_SEM_TIMEOUT
| c::WAIT_TIMEOUT