diff --git a/ICSharpCode.Decompiler/CSharp/ProjectDecompiler/WholeProjectDecompiler.cs b/ICSharpCode.Decompiler/CSharp/ProjectDecompiler/WholeProjectDecompiler.cs
index ed757600b7..f8b687b73b 100644
--- a/ICSharpCode.Decompiler/CSharp/ProjectDecompiler/WholeProjectDecompiler.cs
+++ b/ICSharpCode.Decompiler/CSharp/ProjectDecompiler/WholeProjectDecompiler.cs
@@ -692,7 +692,7 @@ static string CleanUpName(string text, bool separateAtDots, bool treatAsFileName
 					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);