[DATFromDir] Fix basic SuperDAT output

This commit is contained in:
Matt Nadareski
2016-09-14 12:16:34 -07:00
parent 909a01cf18
commit 2cff1a48b1
3 changed files with 13 additions and 4 deletions

View File

@@ -245,7 +245,9 @@ namespace SabreTools
List<Rom> extracted = FileTools.GetArchiveFileInfo(item, _logger);
foreach (Rom rom in extracted)
{
ProcessFileHelper(item, rom, _basePath,
ProcessFileHelper(item,
rom,
_basePath,
(Path.GetDirectoryName(Path.GetFullPath(item)) + Path.DirectorySeparatorChar).Remove(0, _basePath.Length) + Path.GetFileNameWithoutExtension(item));
}
}
@@ -274,7 +276,12 @@ namespace SabreTools
new ParallelOptions { MaxDegreeOfParallelism = _maxDegreeOfParallelism },
entry =>
{
ProcessFile(entry, tempSubDir, Path.GetFileNameWithoutExtension(item));
ProcessFile(entry,
tempSubDir,
Path.Combine((_datdata.Type == "SuperDAT"
? (Path.GetDirectoryName(Path.GetFullPath(item)) + Path.DirectorySeparatorChar).Remove(0, _basePath.Length)
: ""),
Path.GetFileNameWithoutExtension(item)));
});
// Clear the temp directory