summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewer.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2020-02-03 15:13:37 +0200
committerAndrey Lihatskiy <alihatskiy@productengine.com>2020-02-03 15:13:37 +0200
commita52ef7ad60c8821fcb412988d838b58c0414ac8f (patch)
treea6fe2e267b2e7bf70d4a8d8227e1bc1f1152574d /indra/newview/llappviewer.cpp
parentbc496f5f17a446af27b47cbe227e7e85089bab8d (diff)
parent712164210cf57cfde3b17c3162dc4129d52e2780 (diff)
Merge branch 'DRTVWR-499' into DRTVWR-500
Diffstat (limited to 'indra/newview/llappviewer.cpp')
-rw-r--r--indra/newview/llappviewer.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index bf6ba38de2..b1470860fe 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.
@@ -1956,7 +1957,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,""), "*.*");
@@ -1997,6 +1998,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();
@@ -4471,7 +4480,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 <<