Hi Regina,

On Wed, May 20, 2026 at 1:07 PM Regina Henschel <[email protected]> wrote:
> Christian Lohmaier schrieb am 20.05.2026 um 11:30:
> [..]
> > wslpath -m /mnt/c/Users
> C:/Users
>
> > and
> > wslpath -m /mnt/c/Users/
>
> C:/Users

Interesting, but that then

> WSL version: 2.3.26.0

That's pretty old (from 2024), and explains the difference then.
(using 2.7.3 and 2.7.5 here locally, 2.6.1 on CI)

https://github.com/microsoft/WSL/releases/tag/2.4.5 has:
* Update wslpath to preserve trailing slashes (solves #8827)

so that confirms it even more.

> If I run it in GitBash, I get
>
> $ wsl wslpath -m /mnt/c/Users
> C/Program Files/Git/mnt/c/Users
>
> $ wsl wslpath -m /mnt/c/Users/
> C/Program Files/Git/mnt/c/Users/

That's due to a MSYS quirk where it tries to map paths prior, so
that's invalid, to get it to test the existing path you need to set
MSYS_NO_PATHCONV=1 or use a double slash at the beginning of the path
to escape it/to prevent it: //mnt/c/Users

thx for the tests, it at least confirms that the detection of the
value still works as expected/is unchanged, but that there is a
difference in how wslpath works depending on the wsl version and that
the unix-form can be used as "what is the intended result" check.
That's enough to cook up a patch to fix the problem.

ciao
Christian

Reply via email to