summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llappviewer.cpp')
-rw-r--r--indra/newview/llappviewer.cpp21
1 files changed, 18 insertions, 3 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index c8a9596d5e..73a58fee16 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -68,6 +68,7 @@
#include "llviewerwindow.h"
#include "llviewerdisplay.h"
#include "llviewermedia.h"
+#include "llviewerparcelaskplay.h"
#include "llviewerparcelmedia.h"
#include "llviewermediafocus.h"
#include "llviewermessage.h"
@@ -669,7 +670,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.
@@ -1929,6 +1931,11 @@ bool LLAppViewer::cleanup()
{
gSavedPerAccountSettings.saveToFile(gSavedSettings.getString("PerAccountSettingsFile"), TRUE);
LL_INFOS() << "Saved settings" << LL_ENDL;
+
+ if (LLViewerParcelAskPlay::instanceExists())
+ {
+ LLViewerParcelAskPlay::getInstance()->saveSettings();
+ }
}
std::string warnings_settings_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, getSettingsFilename("Default", "Warnings"));
@@ -1949,7 +1956,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,""), "*.*");
@@ -1990,6 +1997,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();
@@ -4461,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 <<