You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
wslpath no longer resolves symlink directories #4078
Your Windows build number: (Type ver at a Windows Command Prompt) Does not work in: Microsoft Windows [Version 10.0.18362.113] Does work in: Microsoft Windows [Version 10.0.17134.765]
What you're doing and what's happening: (Copy&paste the full set of specific command-line steps necessary to reproduce the behavior, and their output. Include screen shots if that helps demonstrate the problem.)
Not working in 10.0.18362.113
joe@JOE-PC2 in ~ λ readlink ~/foobar
/mnt/c/foobar
joe@JOE-PC2 in ~ λ wslpath -w ~/foobar
\\wsl$\Ubuntu\home\joe\foobar
joe@JOE-PC2 in ~ λ wslpath -w $(readlink ~/foobar)
C:\foobar
Working in 10.0.17134.765
joe@JOE-PC in ~ λ readlink ~/foobar
/mnt/c/foobar
joe@JOE-PC in ~ λ wslpath -w ~/foobar
C:\foobar
joe@JOE-PC in ~ λ wslpath -w $(readlink ~/foobar)
C:\foobar
Note that \\wsl$\Ubuntu\home\joe\foobar is not a directory, \\wsl$\ treats directory symbolic links as files.
This is potentially related to #3999? #3999 was introduced in the same version change.
What's wrong / what should be happening instead:
wslpath should behave the way it previously did, and support resolving symbolic links. Even if they're not the target.
My expectations are that wslpath -w does what's required to resolve to a valid Windows path.
Strace of the failing command, if applicable: (If some_command is failing, then run strace -o some_command.strace -f some_command some_args, and link the contents of some_command.strace in a gist here).
Actually, looks like I need one other minor tweak to my fix. It seems like wslpath should probably have a flag to determine if symlinks are followed or not, probably an opt-out since the original behavior was to follow them.
I don't have anything particularly useful to add, but I just wanted to confirm whether this issue is the reason I can't access symlinks in my Linux roof FS from explorer.exe?
Activity
benhillis commentedon Jun 3, 2019
Thanks for filing, you are correct - my fix for #3999 will also fix this since wslpath uses the same path translation functionality.
benhillis commentedon Jun 3, 2019
Actually, looks like I need one other minor tweak to my fix. It seems like wslpath should probably have a flag to determine if symlinks are followed or not, probably an opt-out since the original behavior was to follow them.
#1103: Added docker-machine binary wrapper
wildlyinaccurate commentedon Oct 22, 2019
I don't have anything particularly useful to add, but I just wanted to confirm whether this issue is the reason I can't access symlinks in my Linux roof FS from explorer.exe?
therealkenc commentedon Feb 3, 2020
Appears this fix didn't make 1909 ref #3999 (message).
Dropped docker-machine wrapper