1
0
mirror of synced 2024-11-13 18:50:50 +01:00

One more path fix so directory is always created if textures are present

This commit is contained in:
KillzXGaming 2020-03-18 12:00:49 -04:00
parent 025590f54b
commit 9df4bf6068

View File

@ -1471,11 +1471,12 @@ namespace Toolbox
else if (fileFormat is IArchiveFile) else if (fileFormat is IArchiveFile)
SearchArchive(settings, (IArchiveFile)fileFormat, extension, outputFolder, exportMode); SearchArchive(settings, (IArchiveFile)fileFormat, extension, outputFolder, exportMode);
else if (fileFormat is ITextureContainer && exportMode == ExportMode.Textures) else if (fileFormat is ITextureContainer && exportMode == ExportMode.Textures)
{
if (settings.SeperateTextureContainers && ((ITextureContainer)fileFormat).TextureList.Count > 0)
{ {
string name = fileFormat.FileName.Split('.').FirstOrDefault(); string name = fileFormat.FileName.Split('.').FirstOrDefault();
outputFolder = Path.Combine(outputFolder, name); outputFolder = Path.Combine(outputFolder, name);
if (((ITextureContainer)fileFormat).TextureList.Count > 0)
{
if (!Directory.Exists(outputFolder)) if (!Directory.Exists(outputFolder))
Directory.CreateDirectory(outputFolder); Directory.CreateDirectory(outputFolder);
} }