Perform hashing in one read pass

This commit is contained in:
Deterous
2024-02-20 16:37:15 +09:00
parent c7b49d0c80
commit 9d03dbb7b1
5 changed files with 198 additions and 199 deletions
+1 -1
View File
@@ -131,7 +131,7 @@ namespace LibIRD
if (layerbreak >= 2 * BDLayerSize || layerbreak % SectorSize != 0)
throw new ArgumentException("Unexpected layerbreak value", nameof(size));
}
else
else if (size > BDLayerSize)
{
// If no layerbreak provided, ensure ISO is not BD-Video hybrid
using FileStream fs = new FileStream(isoPath, FileMode.Open, FileAccess.Read) ?? throw new FileNotFoundException(isoPath);