-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Cargo should check for windows-reserved filenames when extracting a package. #8055
Comments
|
failed to set mtime
Since this is marked Easy, I assume an explicit warning of this behavior by Windows is sufficient? Or is there a way to work around this |
@hbina Sorry, I'm not sure I understand your question. I think the best thing to do is to just elaborate the error message when extracting a reserved file. Extracting happens around here. When an error happens, Cargo should check (only on Windows) if the file name (minus any extension), or any of the directory components is reserved (using |
that answered my question. Thanks! |
Hey, if @hbina is not going to work on this, I would like to take that issue! :) |
Following issue rust-lang#8055, added a block before the unpacking stage of `cargo install` to check if any of the paths that the package has contains files or folders with reserved Windows filenames. - Added an error message for these specific cases pointing which is the path an the file that are actually causing the error. - Added an error message for failed obtentions of the path as &str if the Path contains non-UTF8 characters which are non-valid Paths in Windows.
Following rust-lang#8055 we need to propperly print errors if the path to any file of the package contains a windows reserved filename. - Added tests for packages with a file that has a reserved filename on Windows. - Added tests for packages with a folder that has a reserved filaname on Windows.
Fixed by #8136. |
EDIT (ehuss): The issue is that
navi
includes a file namedaux.rs
which is not a valid filename on windows. Cargo should check for these reserved filenames while extracting and provide a better error message.Problem
On Windows Cargo failes to install a package because it fails to set mtime fo a file.
The package where the error occourse is navi version 2.2.0
Console Log
Steps
cargo install navi
Possible Solution(s)
Notes
Output of
cargo version
:cargo 1.44.0-nightly (7019b3ed3 2020-03-17)
cargo 1.42.0 (86334295e 2020-01-31)
has the same problem under Windows but gives shorter error trace.Same package and cargo versions work under Linux Mint.
Also I currently cannot reproduce this with other packages.
The text was updated successfully, but these errors were encountered: