I recently had a user show me a corrupted document (NSPersistentDocument with 
SQLite store). The document would open, but then cause problems later on. The 
initial 10% of the file looks fine, but the remainder is all 0's. I think the 
corruption occurred while doing a Finder copy from one disk image to another, 
so I would simply like to detect the corruption before opening the file.

The problem is currently that the file can be opened, but an exception is only 
thrown when some user action causes a fault to be fetched from a part of the 
file that is corrupt.

So my question is - how do you detect this before loading the file? I'm aware 
of the sqlite3 PRAGMA integrity_check, but there does not seem to be a C API 
for this. Any pointers?

Thanks,
Dave_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to