Rollup merge of #139822 - 0x79de:fix-eopnotsupp-mapping, r=dtolnay

Fix: Map EOPNOTSUPP to ErrorKind::Unsupported on Unix

This change maps the EOPNOTSUPP errno value (95) to std::io::ErrorKind::Unsupported in the decode_error_kind function for Unix platforms. Previously, it was incorrectly mapped to ErrorKind::Uncategorized.

Fixes #139803
This commit is contained in:
Stuart Cook 2025-04-15 15:47:31 +10:00 committed by GitHub
commit 45b644b3c1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -274,6 +274,7 @@ pub fn decode_error_kind(errno: i32) -> ErrorKind {
libc::ETXTBSY => ExecutableFileBusy,
libc::EXDEV => CrossesDevices,
libc::EINPROGRESS => InProgress,
libc::EOPNOTSUPP => Unsupported,
libc::EACCES | libc::EPERM => PermissionDenied,