Map ERROR_INVALID_NAME to FilenameInvalid

This commit is contained in:
Yuki Okushi 2022-01-31 17:28:05 +09:00
parent 755e475c8b
commit cc9407924d
No known key found for this signature in database
GPG Key ID: DABA5B072961C18A

View File

@ -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