mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Fix decoding disc information smaller than 34 bytes. Fixes #675
This commit is contained in:
@@ -367,7 +367,8 @@ namespace Aaru.Core.Devices.Dumping
|
||||
}
|
||||
|
||||
start = DateTime.UtcNow;
|
||||
double imageWriteDuration = 0;
|
||||
double imageWriteDuration = 0;
|
||||
bool writeSingleOpticalTrack = true;
|
||||
|
||||
if(opticalDisc)
|
||||
{
|
||||
@@ -376,8 +377,6 @@ namespace Aaru.Core.Devices.Dumping
|
||||
sense = _dev.ReadDiscInformation(out readBuffer, out _, MmcDiscInformationDataTypes.DiscInformation,
|
||||
_dev.Timeout, out _);
|
||||
|
||||
bool writeSingleOpticalTrack = true;
|
||||
|
||||
if(!sense)
|
||||
{
|
||||
DiscInformation.StandardDiscInformation? discInformation =
|
||||
@@ -560,28 +559,6 @@ namespace Aaru.Core.Devices.Dumping
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if(writeSingleOpticalTrack)
|
||||
{
|
||||
_dumpLog.WriteLine("Creating single track as could not retrieve track list from drive.");
|
||||
|
||||
StoppingErrorMessage?.
|
||||
Invoke("Creating single track as could not retrieve track list from drive.");
|
||||
|
||||
opticalPlugin.SetTracks(new List<Track>
|
||||
{
|
||||
new Track
|
||||
{
|
||||
TrackBytesPerSector = (int)blockSize,
|
||||
TrackEndSector = blocks - 1,
|
||||
TrackSequence = 1,
|
||||
TrackRawBytesPerSector = (int)blockSize,
|
||||
TrackSubchannelType = TrackSubchannelType.None,
|
||||
TrackSession = 1,
|
||||
TrackType = TrackType.Data
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -653,6 +630,27 @@ namespace Aaru.Core.Devices.Dumping
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if(writeSingleOpticalTrack)
|
||||
{
|
||||
_dumpLog.WriteLine("Creating single track as could not retrieve track list from drive.");
|
||||
|
||||
StoppingErrorMessage?.Invoke("Creating single track as could not retrieve track list from drive.");
|
||||
|
||||
(_outputPlugin as IWritableOpticalImage)?.SetTracks(new List<Track>
|
||||
{
|
||||
new Track
|
||||
{
|
||||
TrackBytesPerSector = (int)blockSize,
|
||||
TrackEndSector = blocks - 1,
|
||||
TrackSequence = 1,
|
||||
TrackRawBytesPerSector = (int)blockSize,
|
||||
TrackSubchannelType = TrackSubchannelType.None,
|
||||
TrackSession = 1,
|
||||
TrackType = TrackType.Data
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
DumpHardwareType currentTry = null;
|
||||
|
||||
Submodule Aaru.Decoders updated: 0c1bc24646...ae375b36f5
Reference in New Issue
Block a user