1
0
mirror of synced 2024-11-28 09:20:57 +01:00

Do sub folder creation for batch exporting bflim too

This commit is contained in:
KillzXGaming 2019-07-02 21:25:11 -04:00
parent ab5e4d7562
commit 131a7b940a
5 changed files with 16 additions and 2 deletions

Binary file not shown.

View File

@ -207,7 +207,17 @@ namespace FirstPlugin
if (FileFormat == null)
continue;
SearchBinary(FileFormat, folderDialog.SelectedPath, Extension);
if (FileFormat is SARC)
{
string ArchiveFilePath = Path.Combine(folderDialog.SelectedPath, Path.GetFileNameWithoutExtension(file));
if (!Directory.Exists(ArchiveFilePath))
Directory.CreateDirectory(ArchiveFilePath);
SearchBinary(FileFormat, ArchiveFilePath, Extension);
}
else
SearchBinary(FileFormat, folderDialog.SelectedPath, Extension);
}
}
}
@ -218,13 +228,17 @@ namespace FirstPlugin
{
if (FileFormat is SARC)
{
string ArchiveFilePath = Path.Combine(Folder, Path.GetFileNameWithoutExtension(FileFormat.FileName));
if (!Directory.Exists(ArchiveFilePath))
Directory.CreateDirectory(ArchiveFilePath);
foreach (var file in ((SARC)FileFormat).Files)
{
var archiveFile = STFileLoader.OpenFileFormat(file.FileName, new Type[] { typeof(BFLIM) , typeof(SARC) }, file.FileData);
if (archiveFile == null)
continue;
SearchBinary(archiveFile, Folder, Extension);
SearchBinary(archiveFile, ArchiveFilePath, Extension);
}
}
if (FileFormat is BFLIM)