Fix the key file write path which depends on exceptions from loading before writing being swalloed.

This commit is contained in:
Adam Reichold
2016-02-21 16:44:21 +01:00
parent ad45ba6df1
commit be173412f1
2 changed files with 12 additions and 4 deletions

View File

@@ -199,7 +199,10 @@ int CacheImageData::save (const Glib::ustring& fname)
try {
Glib::KeyFile keyFile;
keyFile.load_from_file (fname);
try {
keyFile.load_from_file (fname);
} catch (Glib::Error&) {}
keyFile.set_string ("General", "MD5", md5);
keyFile.set_string ("General", "Version", VERSION); // Application's version