-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
fix: enable paths with junction inside windows #5245
Conversation
Hey, thank you for opening your first Pull Request ! |
66e364d
to
440ee75
Compare
@ldez I really tried to add tests at first. Because of the required complexity of the system requirements, like having a junction that needs to be created by the test itself and so, I tried to make the impact as simple as possible instead and tested it on my own machine instead. |
440ee75
to
b857efd
Compare
Have to try if |
Potentially it might be also possible to drop |
Can you show me the error log you have? This is to document the topic. |
Co-authored-by: Simon Sawert <[email protected]>
Sure. In this example I've mounted my Dev Drive under
With this PR applied:
BTW: I works also without this PR if I mount it at a dedicated drive like at drive |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This is a workaround for the behavior of
filepath.EvalSymlinks
which errors withsyscall.ENOTDIR
if the provided path does include a Junction on Windows. Junctions can happen if a volume is mounted inside another drive as a subdirectory, for example. This can be usually happen if used with the feature Dev Drives and this replaces existing directories.See original issue golang/go#40180. This issue is currently unresolved, and the ticket is leaning towards leaving this to the interpretation of the evaluating code rather than handling it within
filepath.EvalSymlinks
itself.As
syscall.ENOTDIR
is only returned when callingfilepath.EvalSymlinks
on Windows if a part of the presented path is a Junction and nothing before was a symlink, we simply treat this as NOT symlink, because a symlink above the Junction does not make sense at all.