Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows produces different error codes for empty paths compared to Linux/Darwin #882

Open
jmschonfeld opened this issue Aug 21, 2024 · 0 comments
Assignees

Comments

@jmschonfeld
Copy link
Contributor

Brought up at swiftlang/swift-corelibs-foundation#5074 (comment)

Linux/Darwin provide various error codes like .fileReadNoSuchFile when provided with an empty path. However on Windows we currently throw .fileReadInvalidFileName errors. We should make these behaviors consistent. Originally SCL-F already threw .fileReadInvalidFileName but Darwin threw .fileReadNoSuchFile. With the swift rewrite of FileManager we updated Linux to match what Darwin does, but Windows has still diverged. We should update Windows to match the Linux/Darwin behavior so that we have consistency across our platforms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant