mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Retrieve blocks of CD-R/RW before considering media is empty. Fixes #79
This commit is contained in:
@@ -114,12 +114,6 @@ namespace DiscImageChef.Core.Devices.Dumping
|
|||||||
ATIP.CDATIP? atip = ATIP.Decode(cmdBuf);
|
ATIP.CDATIP? atip = ATIP.Decode(cmdBuf);
|
||||||
if(atip.HasValue)
|
if(atip.HasValue)
|
||||||
{
|
{
|
||||||
if(blocks == 0)
|
|
||||||
{
|
|
||||||
DicConsole.ErrorWriteLine("Cannot dump blank media.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Only CD-R and CD-RW have ATIP
|
// Only CD-R and CD-RW have ATIP
|
||||||
dskType = atip.Value.DiscType ? MediaType.CDRW : MediaType.CDR;
|
dskType = atip.Value.DiscType ? MediaType.CDRW : MediaType.CDR;
|
||||||
|
|
||||||
@@ -399,6 +393,12 @@ namespace DiscImageChef.Core.Devices.Dumping
|
|||||||
tracks[tracks.Length - 1].EndSector = lastSector;
|
tracks[tracks.Length - 1].EndSector = lastSector;
|
||||||
blocks = (ulong)(lastSector + 1);
|
blocks = (ulong)(lastSector + 1);
|
||||||
|
|
||||||
|
if(blocks == 0)
|
||||||
|
{
|
||||||
|
DicConsole.ErrorWriteLine("Cannot dump blank media.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(dumpRaw)
|
if(dumpRaw)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException("Raw CD dumping not yet implemented");
|
throw new NotImplementedException("Raw CD dumping not yet implemented");
|
||||||
|
|||||||
Reference in New Issue
Block a user