The svg2png icon cache is now cleared on new minor version
The `version` value from the `Options` file is compared to the harcoded value (computed at build time) of the running application. If the major or minor version is different, the `svg2png` folder is cleaned at startup-time.
This commit is contained in:
@@ -119,7 +119,7 @@ void RTScalable::deleteDir(const Glib::ustring& path)
|
||||
}
|
||||
}
|
||||
|
||||
void RTScalable::cleanup()
|
||||
void RTScalable::cleanup(bool all)
|
||||
{
|
||||
Glib::ustring imagesCacheFolder = Glib::build_filename (options.cacheBaseDir, "svg2png");
|
||||
Glib::ustring sDPI = Glib::ustring::compose("%1", (int)getTweakedDPI());
|
||||
@@ -134,7 +134,7 @@ void RTScalable::cleanup()
|
||||
continue;
|
||||
}
|
||||
|
||||
if (fileName != sDPI) {
|
||||
if (all || fileName != sDPI) {
|
||||
deleteDir(filePath);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user