-
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
Many applications on Windows (e.g. the Chocolatey wrapper) do not work when current_dir is a canonicalized path #133553
Comments
I think this is fundamentally another case of #42869. Some software just does not like |
I should also note that
Essentially only paths like What |
Wouldn't this change the semantics of what the path is? As far as I could understand, My guess is that, as far as Rustc is concerned, everything is okay (unless there is something more in #42869 mentioned by @ehuss) and rustc |
Sure, simply removing However, what I've done in other projects is to test if the it's possible to round trip paths without change. E.g. if after converting the path, |
That's not a Rust error message. I assume it is printed by |
lsd
) do not work with canonicalized paths
I'm not sure what's going on, lsd is written in Rust, as far as I can see from the repo, and the error snippet is 100% .Net exception (most probably C#). |
Given the name "ShimProgram", I'm assuming they're using a .NET wrapper around lsd. So they're not calling lsd directly. |
So far, I used I used I'm not using any wrapper. If anything is wrapping anything with .NET, it is not being done in my side. |
Did you install lsd via chocolatey or something other package manager? That would explain the shim. |
Oh {deity}! Yes, I tried the same "run in a canonicalized path" again using The weird thing is: I'm getting the same run issues with C++ applications cross-compiled from Linux to Windows -- those applications do not receive the canonicalized path as parameters, but also refuse to run with |
lsd
) do not work with canonicalized paths
Okay, so Rust's
So seems like something in the runtime linked into those applications fails when the current dir is canonicalized? Can you share the error message you are getting for those cases. |
I found a "weird" issue with std::process::Command and canonicalized paths on Windows. Something like (which assumes lsd is installed on the machine):
... works fine for the first execution, showing the current directory contents; but the second execution fails with
... which looks like it is caused due
.canonicalize()
prefixing the path with "\\?\" -- which, for what I can understand, correct, telling Windows that the path must be taken as-in, without any processing.Meta
rustc --version --verbose
:Also note that I'm cross-compiling from Linux to Windows, using "x86_64-pc-windows-gnu" as target triple.
The text was updated successfully, but these errors were encountered: