Separate GetInfo signatures for clarity

This commit is contained in:
Matt Nadareski
2025-01-04 21:32:46 -05:00
parent 825004b422
commit 5a7201e92d
3 changed files with 25 additions and 8 deletions

View File

@@ -314,16 +314,17 @@ namespace SabreTools.DatTools
BaseArchive? archive = FileTypeTool.CreateArchiveType(file);
// Now get all extracted items from the archive
HashType[] hashTypes = quickScan ? [HashType.CRC32] : [HashType.CRC32, HashType.MD5, HashType.SHA1];
if (archive != null)
{
archive.SetHashTypes(quickScan ? [HashType.CRC32] : [HashType.CRC32, HashType.MD5, HashType.SHA1]);
archive.SetHashTypes(hashTypes);
entries = archive.GetChildren();
}
// If the entries list is null, we encountered an error or have a file and should scan externally
if (entries == null && System.IO.File.Exists(file))
{
BaseFile? internalFileInfo = FileTypeTool.GetInfo(file, asFiles: asFiles);
BaseFile? internalFileInfo = FileTypeTool.GetInfo(file, hashTypes, asFiles);
// Create the correct DatItem
DatItem? internalDatItem;