protect against and help repair database corruption
Submitted by Jonathan Matthew
Link to original bug (#453261)
Description
Recently, my rhythmdb.xml file became corrupted in such a way that only ~3000 songs (and no podcasts etc.) were loaded from it. Luckily I had a backup that was only a few hours old.
A few useful things we could do:
- warn the user if there were errors parsing the db file; maybe disable database saving in this case
- include parsing errors in debug output
- try parsing the file after saving it, and only replace the existing copy if the new file parses OK
- maybe keep a backup?
Version: HEAD