Skip to content

Commit

Permalink
Fix #3401: normalize directory separators to use the current platform…
Browse files Browse the repository at this point in the history
… separator
  • Loading branch information
siegfriedpammer committed Feb 20, 2025
1 parent 202c5e2 commit 0096994
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -692,10 +692,10 @@ static string CleanUpName(string text, bool separateAtDots, bool treatAsFileName
if (separateAtDots)
currentSegmentLength = 0;
}
else if (treatAsFileName && (c == '/' || c == '\\') && currentSegmentLength > 1)
else if (treatAsFileName && (c is '/' or '\\') && currentSegmentLength > 1)
{
// if we treat this as a file name, we've started a new segment
b.Append(c);
b.Append(Path.DirectorySeparatorChar);
currentSegmentLength = 0;
}
else
Expand Down

0 comments on commit 0096994

Please sign in to comment.