aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llappviewer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llappviewer.cpp')
-rw-r--r--linden/indra/newview/llappviewer.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp
index 79a78b9..821742c 100644
--- a/linden/indra/newview/llappviewer.cpp
+++ b/linden/indra/newview/llappviewer.cpp
@@ -2915,16 +2915,21 @@ bool LLAppViewer::initCache()
2915 migrateCacheDirectory(); 2915 migrateCacheDirectory();
2916 2916
2917 // Setup and verify the cache location 2917 // Setup and verify the cache location
2918 std::string cache_location = gSavedSettings.getString("CacheLocation"); 2918 std::string cache_location = gSavedSettings.getString("CmdLineCacheLocation");
2919 if (cache_location.empty())
2920 {
2921 cache_location = gSavedSettings.getString("CacheLocation");
2922 }
2919 std::string new_cache_location = gSavedSettings.getString("NewCacheLocation"); 2923 std::string new_cache_location = gSavedSettings.getString("NewCacheLocation");
2920 if (new_cache_location != cache_location) 2924 if ((new_cache_location != cache_location) && new_cache_location != "")
2921 { 2925 {
2922 gDirUtilp->setCacheDir(gSavedSettings.getString("CacheLocation")); 2926 gDirUtilp->setCacheDir(gSavedSettings.getString("CacheLocation"));
2923 purgeCache(); // purge old cache 2927 purgeCache(); // purge old cache
2924 gSavedSettings.setString("CacheLocation", new_cache_location); 2928 gSavedSettings.setString("CacheLocation", new_cache_location);
2929 cache_location = new_cache_location;
2925 } 2930 }
2926 2931
2927 if (!gDirUtilp->setCacheDir(gSavedSettings.getString("CacheLocation"))) 2932 if (!gDirUtilp->setCacheDir(cache_location))
2928 { 2933 {
2929 LL_WARNS("AppCache") << "Unable to set cache location" << LL_ENDL; 2934 LL_WARNS("AppCache") << "Unable to set cache location" << LL_ENDL;
2930 gSavedSettings.setString("CacheLocation", ""); 2935 gSavedSettings.setString("CacheLocation", "");