diff --git a/Aaru.Core/Devices/Dumping/CompactDisc/Dump.cs b/Aaru.Core/Devices/Dumping/CompactDisc/Dump.cs index 9ac8389c7..3a4214480 100644 --- a/Aaru.Core/Devices/Dumping/CompactDisc/Dump.cs +++ b/Aaru.Core/Devices/Dumping/CompactDisc/Dump.cs @@ -339,27 +339,13 @@ namespace Aaru.Core.Devices.Dumping } if(!(_outputPlugin as IWritableOpticalImage).OpticalCapabilities.HasFlag(OpticalImageCapabilities. - CanStorePregaps)) + CanStorePregaps) && + tracks.Where(track => track.TrackSequence != + tracks.First(t => t.TrackSession == track.TrackSession).TrackSequence). + Any(track => track.TrackPregap > 0)) { - foreach(Track track in tracks) + if(!_force) { - if(track.TrackSequence == tracks.First(t => t.TrackSession == track.TrackSession).TrackSequence) - continue; - - if(track.TrackPregap <= 0) - continue; - - if(_force) - { - _dumpLog. - WriteLine("Output format does not support pregaps, this may end in a loss of data, continuing..."); - - ErrorMessage?. - Invoke("Output format does not support pregaps, this may end in a loss of data, continuing..."); - - break; - } - _dumpLog.WriteLine("Output format does not support pregaps, this may end in a loss of data, not continuing..."); StoppingErrorMessage?. @@ -367,6 +353,11 @@ namespace Aaru.Core.Devices.Dumping return; } + + _dumpLog.WriteLine("Output format does not support pregaps, this may end in a loss of data, continuing..."); + + ErrorMessage?. + Invoke("Output format does not support pregaps, this may end in a loss of data, continuing..."); } for(int t = 1; t < tracks.Length; t++)