SL-15070 FIXED Moving the cache does not remove the "cache" folder from the old location

master
Mnikolenko Productengine 2021-04-05 15:35:19 +03:00 committed by Ansariel
parent 9dba08e851
commit d3f74c2dff
1 changed files with 1 additions and 0 deletions

View File

@ -4997,6 +4997,7 @@ bool LLAppViewer::initCache()
LL_INFOS("AppCache") << "Cache location changed, cache needs purging" << LL_ENDL;
gDirUtilp->setCacheDir(gSavedSettings.getString("CacheLocation"));
purgeCache(); // purge old cache
gDirUtilp->deleteDirAndContents(gDirUtilp->getExpandedFilename(LL_PATH_CACHE, cache_dir_name));
gSavedSettings.setString("CacheLocation", new_cache_location);
gSavedSettings.setString("CacheLocationTopFolder", gDirUtilp->getBaseFileName(new_cache_location));
}