Skip to content

Commit

Permalink
Leave paths containing '/~' alone
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
dscho committed Sep 6, 2023
1 parent e03e374 commit 0ea33f2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions winsup/cygwin/msys2_path_conv.cc
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,10 @@ path_type find_path_start_and_type(const char** src, int recurse, const char* en
case '[':
case ']':
goto skip_p2w;
case '/':
if (it + 1 < end && it[1] == '~')
goto skip_p2w;
break;
++it;
}
it = *src;
Expand Down

0 comments on commit 0ea33f2

Please sign in to comment.