Skip to content

Commit 0096994

Browse files
Fix #3401: normalize directory separators to use the current platform separator
1 parent 202c5e2 commit 0096994

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ICSharpCode.Decompiler/CSharp/ProjectDecompiler/WholeProjectDecompiler.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -692,10 +692,10 @@ static string CleanUpName(string text, bool separateAtDots, bool treatAsFileName
692692
if (separateAtDots)
693693
currentSegmentLength = 0;
694694
}
695-
else if (treatAsFileName && (c == '/' || c == '\\') && currentSegmentLength > 1)
695+
else if (treatAsFileName && (c is '/' or '\\') && currentSegmentLength > 1)
696696
{
697697
// if we treat this as a file name, we've started a new segment
698-
b.Append(c);
698+
b.Append(Path.DirectorySeparatorChar);
699699
currentSegmentLength = 0;
700700
}
701701
else

0 commit comments

Comments
 (0)