Browse Source

Fix #3264: Do not allow zero-length segments in CleanUpName: Escape path separator characters at the start of a segment.

pull/3265/head
Siegfried Pammer 9 months ago
parent
commit
e8a9227483
  1. 2
      ICSharpCode.Decompiler/CSharp/ProjectDecompiler/WholeProjectDecompiler.cs

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

@ -692,7 +692,7 @@ namespace ICSharpCode.Decompiler.CSharp.ProjectDecompiler @@ -692,7 +692,7 @@ namespace ICSharpCode.Decompiler.CSharp.ProjectDecompiler
if (separateAtDots)
currentSegmentLength = 0;
}
else if (treatAsFileName && (c == '/' || c == '\\') && currentSegmentLength > 0)
else if (treatAsFileName && (c == '/' || c == '\\') && currentSegmentLength > 1)
{
// if we treat this as a file name, we've started a new segment
b.Append(c);

Loading…
Cancel
Save