diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2022-01-11 19:31:51 +0200 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2022-01-11 19:31:51 +0200 |
commit | c09155574dc0513e0fcd5299ce361155485d25be (patch) | |
tree | f4c70de6b796cc0a62f48de91fa8a5727353385e /indra/newview | |
parent | c8f761fe939fdfe15474ae8e4e6826a1ba4bcdd6 (diff) |
SL-15083 Remove old vfs files
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llappviewer.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 26fa93f492..d17498a6ed 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -4216,12 +4216,16 @@ bool LLAppViewer::initCache() const bool enable_cache_debug_info = gSavedSettings.getBOOL("EnableDiskCacheDebugInfo"); bool texture_cache_mismatch = false; + bool remove_vfs_files = false; if (gSavedSettings.getS32("LocalCacheVersion") != LLAppViewer::getTextureCacheVersion()) { texture_cache_mismatch = true; if(!read_only) { gSavedSettings.setS32("LocalCacheVersion", LLAppViewer::getTextureCacheVersion()); + + //texture cache version was bumped up in Simple Cache Viewer, and at this point old vfs files are not needed + remove_vfs_files = true; } } @@ -4270,8 +4274,14 @@ bool LLAppViewer::initCache() if (gSavedSettings.getS32("DiskCacheVersion") != LLAppViewer::getDiskCacheVersion()) { LLDiskCache::getInstance()->clearCache(); + remove_vfs_files = true; gSavedSettings.setS32("DiskCacheVersion", LLAppViewer::getDiskCacheVersion()); } + + if (remove_vfs_files) + { + LLDiskCache::getInstance()->removeOldVFSFiles(); + } if (mPurgeCache) { |