mirror of
https://github.com/davidgiven/fluxengine.git
synced 2025-10-31 11:17:01 -07:00
Don't replace bad sectors with more bad sectors. This means that if a sector is
permanently bad, the one which wins and goes into the output SectorSet is the first one, not the last one. Frequently the last sector is truncated by the end of read and so it isn't useful.
This commit is contained in:
@@ -149,7 +149,7 @@ static void replace_sector(std::unique_ptr<Sector>& replacing, Sector& replaceme
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!replacing || (replacing->status != Sector::OK))
|
||||
if (!replacing || ((replacing->status != Sector::OK) && (replacement.status == Sector::OK)))
|
||||
{
|
||||
if (!replacing)
|
||||
replacing.reset(new Sector);
|
||||
|
||||
Reference in New Issue
Block a user