-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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: An empty path returns os error 123 instead of os error 3 with recent nightly #90940
Comments
Thanks for finding and fixing that! I do think that But I don't think that should block your current PR. |
Sounds good, maybe it should be |
@m-ou-se is it intentional that E-medium is added instead of P-medium? |
Oh oops. |
windows: Return the "Not Found" error when a path is empty Fixes rust-lang#90940
windows: Return the "Not Found" error when a path is empty Fixes rust-lang#90940
…nput, r=m-ou-se Rename `FilenameTooLong` to `InvalidFilename` and also use it for Windows' `ERROR_INVALID_NAME` Address rust-lang#90940 (comment) `ERROR_INVALID_NAME` (i.e. "The filename, directory name, or volume label syntax is incorrect") happens if we pass an invalid filename, directory name, or label syntax, so mapping as `InvalidInput` is reasonable to me.
…nput, r=m-ou-se Rename `FilenameTooLong` to `InvalidFilename` and also use it for Windows' `ERROR_INVALID_NAME` Address rust-lang#90940 (comment) `ERROR_INVALID_NAME` (i.e. "The filename, directory name, or volume label syntax is incorrect") happens if we pass an invalid filename, directory name, or label syntax, so mapping as `InvalidInput` is reasonable to me.
…nput, r=m-ou-se Rename `FilenameTooLong` to `InvalidFilename` and also use it for Windows' `ERROR_INVALID_NAME` Address rust-lang#90940 (comment) `ERROR_INVALID_NAME` (i.e. "The filename, directory name, or volume label syntax is incorrect") happens if we pass an invalid filename, directory name, or label syntax, so mapping as `InvalidInput` is reasonable to me.
I tried this code:
I expected to see this happen:
canonicalize()
returns os error 3 (ERROR_PATH_NOT_FOUND
)Instead, this happened: it returns os error 123 (
ERROR_INVALID_NAME
)This is problematic as
std::io::ErrorKind
doesn't becomeNotFound
butUncategorized
, which isn't useful for most users. Other platforms like Linux returnNotFound
so the former behavior should be correct here.Meta
rustc --version --verbose
:The issue doesn't happen on
rustc 1.58.0-nightly (e99963c55 2021-10-29)
, I think the regression was introduced by #89174.The text was updated successfully, but these errors were encountered: