Remove hard-wired ".pp2" strings to make transition to ".pp3" easier

This commit is contained in:
gabor
2010-05-20 17:37:32 +02:00
parent c5a72d2d84
commit c427279ce3
10 changed files with 36 additions and 34 deletions

View File

@@ -103,7 +103,7 @@ void CacheManager::deleteEntry (const Glib::ustring& fname) {
r = openEntries.find (fname);
if (r==openEntries.end() && md5!="") {
::g_remove ((getCacheFileName ("data", fname, md5) + ".txt").c_str());
::g_remove ((getCacheFileName ("profiles", fname, md5) + ".pp2").c_str());
::g_remove ((getCacheFileName ("profiles", fname, md5) + paramFileExtension).c_str());
::g_remove ((getCacheFileName ("images", fname, md5) + ".cust").c_str());
::g_remove ((getCacheFileName ("images", fname, md5) + ".jpg").c_str());
::g_remove ((getCacheFileName ("aehistograms", fname, md5)).c_str());
@@ -114,7 +114,7 @@ void CacheManager::deleteEntry (const Glib::ustring& fname) {
std::string md5 = getMD5 (fname);
if (md5!="") {
::g_remove ((getCacheFileName ("data", fname, md5) + ".txt").c_str());
::g_remove ((getCacheFileName ("profiles", fname, md5) + ".pp2").c_str());
::g_remove ((getCacheFileName ("profiles", fname, md5) + paramFileExtension).c_str());
::g_remove ((getCacheFileName ("images", fname, md5) + ".cust").c_str());
::g_remove ((getCacheFileName ("images", fname, md5) + ".jpg").c_str());
::g_remove ((getCacheFileName ("aehistograms", fname, md5)).c_str());
@@ -128,7 +128,7 @@ void CacheManager::renameEntry (const std::string& oldfilename, const std::strin
std::string newmd5 = getMD5 (newfilename);
::g_rename ((getCacheFileName ("profiles", oldfilename, oldmd5) + ".pp2").c_str(), (getCacheFileName ("profiles", newfilename, newmd5) + ".pp2").c_str());
::g_rename ((getCacheFileName ("profiles", oldfilename, oldmd5) + paramFileExtension).c_str(), (getCacheFileName ("profiles", newfilename, newmd5) + paramFileExtension).c_str());
::g_rename ((getCacheFileName ("images", oldfilename, oldmd5) + ".cust").c_str(), (getCacheFileName ("images", newfilename, newmd5) + ".cust").c_str());
::g_rename ((getCacheFileName ("images", oldfilename, oldmd5) + ".jpg").c_str(), (getCacheFileName ("images", newfilename, newmd5) + ".jpg").c_str());
::g_rename ((getCacheFileName ("aehistograms", oldfilename, oldmd5)).c_str(), (getCacheFileName ("aehistograms", newfilename, newmd5)).c_str());
@@ -245,7 +245,7 @@ void CacheManager::applyCacheSizeLimitation () {
::g_remove ((Glib::build_filename (Glib::build_filename (baseDir, "images"), flist.front().fname) + ".jpg").c_str());
::g_remove ((Glib::build_filename (Glib::build_filename (baseDir, "aehistograms"), flist.front().fname)).c_str());
::g_remove ((Glib::build_filename (Glib::build_filename (baseDir, "embprofiles"), flist.front().fname) + ".icc").c_str());
// ::g_remove ((Glib::build_filename (Glib::build_filename (baseDir, "profiles"), flist.front().fname) + ".pp2").c_str());
// ::g_remove ((Glib::build_filename (Glib::build_filename (baseDir, "profiles"), flist.front().fname) + paramFileExtension).c_str());
flist.erase (flist.begin());
}
}