From 4eea4bf3530c3e7aa61b1b8f3e767da40f641fc0 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Sat, 19 Nov 2022 10:27:31 +0100 Subject: [PATCH] Fix #2830: Can't decompile project with / in resource name on Windows --- .../CSharp/ProjectDecompiler/WholeProjectDecompiler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ICSharpCode.Decompiler/CSharp/ProjectDecompiler/WholeProjectDecompiler.cs b/ICSharpCode.Decompiler/CSharp/ProjectDecompiler/WholeProjectDecompiler.cs index 8d880f4f0..e342df4a6 100644 --- a/ICSharpCode.Decompiler/CSharp/ProjectDecompiler/WholeProjectDecompiler.cs +++ b/ICSharpCode.Decompiler/CSharp/ProjectDecompiler/WholeProjectDecompiler.cs @@ -426,7 +426,7 @@ namespace ICSharpCode.Decompiler.CSharp.ProjectDecompiler // the directory part Namespace1\Namespace2\... reuses as many existing directories as // possible, and only the remaining name parts are used as prefix for the filename. // This is not affected by the UseNestedDirectoriesForNamespaces setting. - string[] splitName = fullName.Split(Path.DirectorySeparatorChar); + string[] splitName = fullName.Split('\\', '/'); string fileName = string.Join(".", splitName); string separator = Path.DirectorySeparatorChar.ToString(); for (int i = splitName.Length - 1; i > 0; i--)