Skip to content
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

wslpath no longer resolves symlink directories #4078

Closed
jlennox opened this issue May 30, 2019 · 4 comments
Closed

wslpath no longer resolves symlink directories #4078

jlennox opened this issue May 30, 2019 · 4 comments

Comments

@jlennox
Copy link

jlennox commented May 30, 2019

  • 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).

Please let me know if this is required.

@benhillis
Copy link
Member

Thanks for filing, you are correct - my fix for #3999 will also fix this since wslpath uses the same path translation functionality.

@benhillis
Copy link
Member

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.

@wildlyinaccurate
Copy link

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
Copy link
Collaborator

Appears this fix didn't make 1909 ref #3999 (message).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants