From 00969946795b5d36caebe75dc56ee25672e1f749 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Thu, 20 Feb 2025 10:00:59 +0100 Subject: [PATCH] Fix #3401: normalize directory separators to use the current platform separator --- .../CSharp/ProjectDecompiler/WholeProjectDecompiler.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ICSharpCode.Decompiler/CSharp/ProjectDecompiler/WholeProjectDecompiler.cs b/ICSharpCode.Decompiler/CSharp/ProjectDecompiler/WholeProjectDecompiler.cs index f8b687b73..da5671559 100644 --- a/ICSharpCode.Decompiler/CSharp/ProjectDecompiler/WholeProjectDecompiler.cs +++ b/ICSharpCode.Decompiler/CSharp/ProjectDecompiler/WholeProjectDecompiler.cs @@ -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