Skip to content

Commit 6efd127

Browse files
committed
Leave paths containing '/~' alone
We do not perform tilde expansion in the MSys2 runtime; let's leave those paths intact for programs that want to expand such paths themselves. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent 99a84e0 commit 6efd127

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

winsup/cygwin/msys2_path_conv.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,10 @@ path_type find_path_start_and_type(const char** src, int recurse, const char* en
364364
case '[':
365365
case ']':
366366
goto skip_p2w;
367+
case '/':
368+
if (it + 1 < end && it[1] == '~')
369+
goto skip_p2w;
370+
break;
367371
++it;
368372
}
369373
it = *src;

0 commit comments

Comments
 (0)