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,7 +680,8 @@ namespace DiscImageChef.Core.Devices.Dumping
|
|||||||
dumpLog.WriteLine("Finished partition {0}", currentPartition);
|
dumpLog.WriteLine("Finished partition {0}", currentPartition);
|
||||||
|
|
||||||
currentTapeFile.LastBlock = currentBlock - 1;
|
currentTapeFile.LastBlock = currentBlock - 1;
|
||||||
(outputPlugin as IWritableTapeImage).AddFile(currentTapeFile);
|
if(currentTapeFile.LastBlock > currentTapeFile.FirstBlock)
|
||||||
|
(outputPlugin as IWritableTapeImage).AddFile(currentTapeFile);
|
||||||
|
|
||||||
currentTapePartition.LastBlock = currentBlock - 1;
|
currentTapePartition.LastBlock = currentBlock - 1;
|
||||||
(outputPlugin as IWritableTapeImage).AddPartition(currentTapePartition);
|
(outputPlugin as IWritableTapeImage).AddPartition(currentTapePartition);
|
||||||
@@ -843,10 +844,15 @@ namespace DiscImageChef.Core.Devices.Dumping
|
|||||||
blocks = currentBlock + 1;
|
blocks = currentBlock + 1;
|
||||||
end = DateTime.UtcNow;
|
end = DateTime.UtcNow;
|
||||||
|
|
||||||
currentTapeFile.LastBlock = currentBlock - 1;
|
// If not aborted this is added at the end of medium
|
||||||
(outputPlugin as IWritableTapeImage).AddFile(currentTapeFile);
|
if(aborted)
|
||||||
currentTapePartition.LastBlock = currentBlock - 1;
|
{
|
||||||
(outputPlugin as IWritableTapeImage).AddPartition(currentTapePartition);
|
currentTapeFile.LastBlock = currentBlock - 1;
|
||||||
|
(outputPlugin as IWritableTapeImage).AddFile(currentTapeFile);
|
||||||
|
|
||||||
|
currentTapePartition.LastBlock = currentBlock - 1;
|
||||||
|
(outputPlugin as IWritableTapeImage).AddPartition(currentTapePartition);
|
||||||
|
}
|
||||||
|
|
||||||
EndProgress?.Invoke();
|
EndProgress?.Invoke();
|
||||||
mhddLog.Close();
|
mhddLog.Close();
|
||||||
|
|||||||
Reference in New Issue
Block a user