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

This commit is contained in:
Siegfried Pammer
2024-08-17 19:38:53 +02:00
parent 4864ef4462
commit e8a9227483
@@ -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);