Only print warning for non-contiguous files
This commit is contained in:
+1
-1
@@ -785,7 +785,7 @@ namespace IRDKit
|
||||
try
|
||||
{
|
||||
// Read key from .key file
|
||||
byte[] discKey = File.ReadAllBytes(keyPath);
|
||||
byte[] discKey = File.ReadAllBytes(keyfilePath);
|
||||
if (discKey == null || discKey.Length != 16)
|
||||
Console.Error.WriteLine($"{hexKey} is not a valid key, detecting key automatically...");
|
||||
else
|
||||
|
||||
+4
-4
@@ -715,7 +715,7 @@ namespace LibIRD
|
||||
HashFiles(fs, reader, rootDir);
|
||||
if (FileCount != fileCount)
|
||||
{
|
||||
Console.WriteLine($"{isoPath} contains split files: detected {FileCount} out of {fileCount} expected files");
|
||||
//Console.WriteLine($"{isoPath} contains split files: detected {FileCount} out of {fileCount} expected files");
|
||||
long[] tempFileKeys = FileKeys;
|
||||
Array.Resize(ref tempFileKeys, (int)FileCount);
|
||||
FileKeys = tempFileKeys;
|
||||
@@ -943,6 +943,9 @@ namespace LibIRD
|
||||
if (fileClusters[i] == null)
|
||||
throw new InvalidFileSystemException($"Unexpected file extents for {filePath}");
|
||||
|
||||
if (fileClusters[i].Offset * SectorSize != fileClusters[i - 1].Offset * SectorSize + fileClusters[i - 1].Count)
|
||||
Console.WriteLine($"Non-contiguous file found: {filePath}");
|
||||
|
||||
if (fileClusters[i].Offset < smallestOffset)
|
||||
smallestOffset = fileClusters[i].Offset;
|
||||
}
|
||||
@@ -951,9 +954,6 @@ namespace LibIRD
|
||||
if (Array.Exists(FileKeys, element => element == smallestOffset))
|
||||
continue;
|
||||
|
||||
if (fileClusters.Length > 1)
|
||||
Console.WriteLine($"Split file detected: {filePath}");
|
||||
|
||||
// Add file offset to keys
|
||||
FileKeys[FileCount] = smallestOffset;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user