mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Fix tape dump adding a spurious file at the end of a tape.
This commit is contained in:
@@ -680,6 +680,7 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
dumpLog.WriteLine("Finished partition {0}", currentPartition);
|
||||
|
||||
currentTapeFile.LastBlock = currentBlock - 1;
|
||||
if(currentTapeFile.LastBlock > currentTapeFile.FirstBlock)
|
||||
(outputPlugin as IWritableTapeImage).AddFile(currentTapeFile);
|
||||
|
||||
currentTapePartition.LastBlock = currentBlock - 1;
|
||||
@@ -843,10 +844,15 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
blocks = currentBlock + 1;
|
||||
end = DateTime.UtcNow;
|
||||
|
||||
// If not aborted this is added at the end of medium
|
||||
if(aborted)
|
||||
{
|
||||
currentTapeFile.LastBlock = currentBlock - 1;
|
||||
(outputPlugin as IWritableTapeImage).AddFile(currentTapeFile);
|
||||
|
||||
currentTapePartition.LastBlock = currentBlock - 1;
|
||||
(outputPlugin as IWritableTapeImage).AddPartition(currentTapePartition);
|
||||
}
|
||||
|
||||
EndProgress?.Invoke();
|
||||
mhddLog.Close();
|
||||
|
||||
Reference in New Issue
Block a user