mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[DatFile] Respect the archivesAsFiles and enableGzip flags
This commit is contained in:
@@ -202,8 +202,17 @@ namespace SabreTools.Helper.Dats
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create a list for all found items
|
// Create a list for all found items
|
||||||
List<Rom> extracted = new List<Rom>();
|
List<Rom> extracted = null;
|
||||||
|
|
||||||
|
// Temporarily set the archivesAsFiles if we have a GZip archive and we're not supposed to use it as one
|
||||||
|
if (archivesAsFiles && !enableGzip && newItem.EndsWith(".gz"))
|
||||||
|
{
|
||||||
|
archivesAsFiles = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If we don't have archives as files, try to scan the file as an archive
|
||||||
|
if (!archivesAsFiles)
|
||||||
|
{
|
||||||
// If all deep hash skip flags are set, do a quickscan
|
// If all deep hash skip flags are set, do a quickscan
|
||||||
if (omitFromScan == Hash.SecureHashes)
|
if (omitFromScan == Hash.SecureHashes)
|
||||||
{
|
{
|
||||||
@@ -214,9 +223,10 @@ namespace SabreTools.Helper.Dats
|
|||||||
{
|
{
|
||||||
extracted = ArchiveTools.GetExtendedArchiveFileInfo(newItem, omitFromScan: omitFromScan, date: addDate);
|
extracted = ArchiveTools.GetExtendedArchiveFileInfo(newItem, omitFromScan: omitFromScan, date: addDate);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// If the extracted list is null, just scan the item itself
|
// If the extracted list is null, just scan the item itself
|
||||||
if (extracted == null)
|
if (extracted == null || archivesAsFiles)
|
||||||
{
|
{
|
||||||
PopulateFromDirProcessFile(newItem, "", newBasePath, omitFromScan, addDate, headerToCheckAgainst);
|
PopulateFromDirProcessFile(newItem, "", newBasePath, omitFromScan, addDate, headerToCheckAgainst);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user