lclevy / ADFlib

A free, portable and open implementation of the Amiga filesystem
GNU General Public License v2.0
90 stars 30 forks source link

Reading files with incorrect checksums on (data) blocks #62

Closed t-w closed 6 months ago

t-w commented 1 year ago

Currently, the file read operation (adfFileRead) stops reading the file in case of an incorrect block checksum. And there is no indication for the client code about the error - reading just stops.

Such situation was already encountered on several ADF images, so it seems there can be more cases like this, and it is troublesome that the files cannot be read "just" because of the incorrect checksum (having in fact correct contents).

So - there is a need to have a mechanism that:

Both things can be done either on the level of volume (mount) or file (open), eventually set with some additional function.

lclevy commented 11 months ago

Could be an option to consider read errors as warning or error, the latest breaking operations. Could be 'ignore read errors ' not enabled by default

t-w commented 8 months ago

I have added ignoreChecksumErrors option to adfEnv structure. It controls whether operations fail on checksum errors or not. It is false by default (checksum errors will cause operations to fail).

lclevy commented 8 months ago

👍