Skip to content

wslpath no longer resolves symlink directories #4078

Closed

Description

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

Activity

  1. benhillis commented on Jun 3, 2019

    @benhillis
    Member

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

  2. benhillis commented on Jun 3, 2019

    @benhillis
    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.

  3. added a commit that references this issue on Aug 16, 2019
  4. wildlyinaccurate commented on Oct 22, 2019

    @wildlyinaccurate

    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?

  5. therealkenc commented on Feb 3, 2020

    @therealkenc

    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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions