Browse Source

Fix #3072: Ignore resources have the same name as a namespace.

pull/3195/head
Siegfried Pammer 1 year ago
parent
commit
1fca3da27b
  1. 13
      ICSharpCode.Decompiler/CSharp/ProjectDecompiler/WholeProjectDecompiler.cs

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

@ -246,7 +246,18 @@ namespace ICSharpCode.Decompiler.CSharp.ProjectDecompiler @@ -246,7 +246,18 @@ namespace ICSharpCode.Decompiler.CSharp.ProjectDecompiler
{
string dir = Settings.UseNestedDirectoriesForNamespaces ? CleanUpPath(ns) : CleanUpDirectoryName(ns);
if (directories.Add(dir))
Directory.CreateDirectory(Path.Combine(TargetDirectory, dir));
{
var path = Path.Combine(TargetDirectory, dir);
try
{
Directory.CreateDirectory(path);
}
catch (IOException)
{
File.Delete(path);
Directory.CreateDirectory(path);
}
}
return Path.Combine(dir, file);
}
}

Loading…
Cancel
Save