mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-10 07:04:36 +00:00
Fix file names with slashes (#450)
In Luigi's Manson 3, some of the archived models have slashes in their names. This means that they can't be exported with those names, and Toolbox will crash when it reaches them, if you try to "export all". What i have done to fix this, is make toolbox treat names with slashes as directory paths, with a file name on the end.
This commit is contained in:
parent
205c8d7ba2
commit
f6e3da8473
1 changed files with 4 additions and 1 deletions
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
@ -63,7 +64,9 @@ namespace FirstPlugin.LuigisMansion3
|
|||
|
||||
settings.SuppressConfirmDialog = true;
|
||||
|
||||
DAE.Export($"{folderPath}/{mdl.Text}.dae", settings, model, new List<STGenericTexture>());
|
||||
if (mdl.Text.Contains("/"))
|
||||
Directory.CreateDirectory($"{folderPath}/{Path.GetDirectoryName(mdl.Text)}");
|
||||
DAE.Export($"{folderPath}/{mdl.Text.Replace("/", "//")}.dae", settings, model, new List<STGenericTexture>());
|
||||
}
|
||||
|
||||
System.Windows.Forms.MessageBox.Show($"Exported models Successfuly!");
|
||||
|
|
Loading…
Reference in a new issue