C#: Don't fail class/tree folder creation with invalid namespace names
This commit is contained in:
@@ -292,7 +292,7 @@ namespace Il2CppInspector.Outputs
|
|||||||
var usings = nsRefs.OrderBy(n => (n.StartsWith("System.") || n == "System") ? "0" + n : "1" + n);
|
var usings = nsRefs.OrderBy(n => (n.StartsWith("System.") || n == "System") ? "0" + n : "1" + n);
|
||||||
|
|
||||||
// Ensure output directory exists and is not a file
|
// Ensure output directory exists and is not a file
|
||||||
var dir = Path.GetDirectoryName(outFile);
|
var dir = Regex.Replace(Path.GetDirectoryName(outFile), @"[<>:""\|\?\*]", "_");
|
||||||
if (!string.IsNullOrEmpty(dir)) {
|
if (!string.IsNullOrEmpty(dir)) {
|
||||||
try {
|
try {
|
||||||
Directory.CreateDirectory(dir);
|
Directory.CreateDirectory(dir);
|
||||||
|
|||||||
Reference in New Issue
Block a user