-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
std::os::windows::fs::symlink_file appears to incorrectly handle absolute paths #138688
Comments
As the path in actually was longer than 260 characters, the sample used as simplified. |
You got a typo there I think. (storage vs stroage) |
The standard library could definitely be smarter here and do that automatically for you. Though care needs to be taken not to do this for relative paths as those might be intentionally relative (e.g. so a directory can be moved around without breaking the symlinks it contains). |
Yeah this was a quick substitution as the real path was much longer and somewhat NSFW.
It does?
The problem AFAIT is that a Manifest isn't embedded within the binary to actually enable long path functionality? |
No it only does it for the path to the symlink, not the link's target rust/library/std/src/sys/fs/windows.rs Line 1355 in a7fc463
This would need some additional logic to pass through simple relative paths but to make verbatim absolute paths longer than |
Cool. Forcing long paths everywhere via the registery & embedding a manifest appears to have fixed my issue. I"ll close this as "Error exists between keyboard & chair". |
I tried this code:
I expected to see this happen:
When ran locally, it works fine.
When ran with absolute paths
To be clear, the path does exist.
Instead, this happened: explanation
I expect a symlink is created.
I say this because, I am in developer mode.
I have granted myself the ability to create symlinks via
secpol.msc
as well.So I don't believe it is a permission issue.
Meta
rustc --version --verbose
:Windows 11 Pro for Workstations (AMD64)
The text was updated successfully, but these errors were encountered: