mirror of
https://github.com/apple/swift-nio
synced 2026-11-24 04:37:54 +00:00
## Summary - NIOFileSystem's `open` syscall error mapping only handled `EACCES` (`.permissionDenied`) but not `EPERM` (`.notPermitted`), causing EPERM errors (e.g., on network volumes) to be classified as "unknown" instead of `permissionDenied` - Added `.notPermitted` alongside `.permissionDenied` in the `open()` switch case in `FileSystemError+Syscall.swift` (both `NIOFS` and `_NIOFileSystem` modules) - Added corresponding test expectation for the new errno mapping ## Motivation Other syscall handlers in the same file (`remove`, `symlink`, `unlink`, `futimens`) already correctly handle both `.permissionDenied` and `.notPermitted` as `permissionDenied`. The `open` handler was missing this treatment. Fixes #3559 ## Test plan - [x] Updated `testErrnoMapping_open` to verify `.notPermitted` maps to `.permissionDenied` - [ ] CI will validate on all supported Swift versions 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>