diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2020-02-03 15:17:51 +0200 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2020-02-03 15:17:51 +0200 |
commit | e58b5263598368b6dec4a836c72c69b50d701911 (patch) | |
tree | d454f4ed2089cef10d6033f3780476b146e3dd7e /indra/newview/llappviewer.cpp | |
parent | 95af08341c5b20e7faeb58a4d39fae5d8b25fcee (diff) | |
parent | a52ef7ad60c8821fcb412988d838b58c0414ac8f (diff) |
Merge branch 'DRTVWR-500' into DRTVWR-501
Diffstat (limited to 'indra/newview/llappviewer.cpp')
-rw-r--r-- | indra/newview/llappviewer.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 3e33815b20..7206e43321 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -673,7 +673,8 @@ LLAppViewer::LLAppViewer() mReportedCrash(false), mNumSessions(0), mPurgeCache(false), - mPurgeOnExit(false), + mPurgeCacheOnExit(false), + mPurgeUserDataOnExit(false), mSecondInstance(false), mSavedFinalSnapshot(false), mSavePerAccountSettings(false), // don't save settings on logout unless login succeeded. @@ -1952,7 +1953,7 @@ bool LLAppViewer::cleanup() LLConversationLog::instance().cache(); } - if (mPurgeOnExit) + if (mPurgeCacheOnExit) { LL_INFOS() << "Purging all cache files on exit" << LL_ENDL; gDirUtilp->deleteFilesInDir(gDirUtilp->getExpandedFilename(LL_PATH_CACHE,""), "*.*"); @@ -1993,6 +1994,14 @@ bool LLAppViewer::cleanup() } } + if (mPurgeUserDataOnExit) + { + // Ideally we should not save anything from this session since it is going to be purged now, + // but this is a very 'rare' case (user deleting himself), not worth overcomplicating 'save&cleanup' code + std::string user_path = gDirUtilp->getOSUserAppDir() + gDirUtilp->getDirDelimiter() + LLStartUp::getUserId(); + gDirUtilp->deleteDirAndContents(user_path); + } + // Delete workers first // shotdown all worker threads before deleting them in case of co-dependencies mAppCoreHttp.requestStop(); @@ -4467,7 +4476,7 @@ void LLAppViewer::badNetworkHandler() // Flush all of our caches on exit in the case of disconnect due to // invalid packets. - mPurgeOnExit = TRUE; + mPurgeCacheOnExit = TRUE; std::ostringstream message; message << |