Clear old cache location when moving cache - shared cache is not an issue here

meow-7.2.2
Ansariel 2021-04-11 14:59:22 +02:00
parent 1d0194f0fd
commit 9dba08e851
1 changed files with 3 additions and 4 deletions

View File

@ -4994,10 +4994,9 @@ bool LLAppViewer::initCache()
std::string new_cache_location = gSavedSettings.getString("NewCacheLocation");
if (new_cache_location != cache_location)
{
// AO: Don't automatically purge old cache location, has unwanted side effects with shared caches, upgrades
//LL_INFOS("AppCache") << "Cache location changed, cache needs purging" << LL_ENDL;
//gDirUtilp->setCacheDir(gSavedSettings.getString("CacheLocation"));
//purgeCache(); // purge old cache
LL_INFOS("AppCache") << "Cache location changed, cache needs purging" << LL_ENDL;
gDirUtilp->setCacheDir(gSavedSettings.getString("CacheLocation"));
purgeCache(); // purge old cache
gSavedSettings.setString("CacheLocation", new_cache_location);
gSavedSettings.setString("CacheLocationTopFolder", gDirUtilp->getBaseFileName(new_cache_location));
}