Not quite right, Peter. What I found is if as soon as the database corrupt message shows up, I closed calibre and then safely ejected my Kobo, the database was not corrupted. I did use a reboot to force the database to close before trying to reconnect.
I suppose you could mount your Kobo, look at the .kobo directory and then safely eject and reboot if sqlite-wal/sqlite-shm files are present. If not, run calibre as usual. I played with several ideas when my Sage was running firmware that was prone to database corruption and found a simple reboot before connecting was safer and faster than connecting, checking for the journal files and ejecting and rebooting if the journal files were present.
|