Skip to content

When converting to a Unix path, avoid double trailing slashes#115

Merged
dscho merged 1 commit into
msys2:msys2-3_3_6-releasefrom
dscho:avoid-trailing-double-slash-in-cygpath-u
Nov 11, 2022
Merged

When converting to a Unix path, avoid double trailing slashes#115
dscho merged 1 commit into
msys2:msys2-3_3_6-releasefrom
dscho:avoid-trailing-double-slash-in-cygpath-u

Conversation

@dscho

@dscho dscho commented Nov 8, 2022

Copy link
Copy Markdown
Collaborator

This fixes #112

@dscho dscho self-assigned this Nov 8, 2022
@dscho
dscho marked this pull request as ready for review November 8, 2022 15:59
Comment thread winsup/cygwin/mount.cc
When calling `cygpath -u C:/msys64/` in an MSYS2 setup that was
installed into `C:/msys64/`, the result should be `/`, not `//`.

Let's ensure that we do not append another trailing slash if the
converted path already ends in a slash.

This fixes msys2#112

Signed-off-by: Johannes Schindelin <[email protected]>
@dscho
dscho force-pushed the avoid-trailing-double-slash-in-cygpath-u branch from 24d201e to d065770 Compare November 9, 2022 14:45
@dscho
dscho requested a review from lazka November 9, 2022 22:30
@dscho
dscho merged commit 1a46b7d into msys2:msys2-3_3_6-release Nov 11, 2022
@dscho
dscho deleted the avoid-trailing-double-slash-in-cygpath-u branch November 11, 2022 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cygpath roundtrip produces double slash: cygpath -u cygpath -m / -> //

2 participants