Browse Source

Fix #3401: normalize directory separators to use the current platform separator

pull/3404/head
Siegfried Pammer 3 months ago
parent
commit
0096994679
  1. 4
      ICSharpCode.Decompiler/CSharp/ProjectDecompiler/WholeProjectDecompiler.cs

4
ICSharpCode.Decompiler/CSharp/ProjectDecompiler/WholeProjectDecompiler.cs

@ -692,10 +692,10 @@ namespace ICSharpCode.Decompiler.CSharp.ProjectDecompiler @@ -692,10 +692,10 @@ namespace ICSharpCode.Decompiler.CSharp.ProjectDecompiler
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

Loading…
Cancel
Save