• Jeremy Hylton's avatar
    Fix some serious bugs in fsrecover. · 6e2383e5
    Jeremy Hylton authored
    When a corrupted record is found, it guesses a location for the next
    good transaction header.  If the guessed location happened to have a
    'c' character at just the right spot, it would think it was at the end
    of the file.
    
    Fix in off-by-one bug in scan() that lead to failure.
    
    Do more sanity checks for invalid transaction headers following a
    scan.
    
    Use restore() instead of store() to copy data.  This change should
    maximize the chance that the recovered storage is identical except for
    the damaged records.
    
    Add tests from the trunk and remove test in testFileStorage.
    6e2383e5
fsrecover.py 9.8 KB