mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Refactor IOpticalMediaImage.ReadSector(s) to return error status instead of buffer.
This commit is contained in:
@@ -118,7 +118,14 @@ namespace Aaru.Core
|
||||
UpdateProgress2Event?.Invoke($"Entropying sector {i + 1} of track {currentTrack.Sequence}",
|
||||
(long)(i + 1), (long)currentTrack.EndSector);
|
||||
|
||||
byte[] sector = opticalMediaImage.ReadSector(i, currentTrack.Sequence);
|
||||
ErrorNumber errno = opticalMediaImage.ReadSector(i, currentTrack.Sequence, out byte[] sector);
|
||||
|
||||
if(errno != ErrorNumber.NoError)
|
||||
{
|
||||
AaruConsole.ErrorWriteLine($"Error {errno} while reading sector {i}, continuing...");
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
if(duplicatedSectors)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user