summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewermacosx.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llappviewermacosx.cpp')
-rw-r--r--indra/newview/llappviewermacosx.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp
index aa932f9c89..cb5cac6f2d 100644
--- a/indra/newview/llappviewermacosx.cpp
+++ b/indra/newview/llappviewermacosx.cpp
@@ -57,6 +57,7 @@
#include <fstream>
#include "lldir.h"
+#include "lldiriterator.h"
#include <signal.h>
#include <CoreAudio/CoreAudio.h> // for systemwide mute
class LLMediaCtrl; // for LLURLDispatcher
@@ -136,6 +137,14 @@ void cleanupViewer()
gViewerAppPtr = NULL;
}
+void clearDumpLogsDir()
+{
+ if (!LLAppViewer::instance()->isSecondInstance())
+ {
+ gDirUtilp->deleteDirAndContents(gDirUtilp->getDumpLogsDirPath());
+ }
+}
+
// The BugsplatMac API is structured as a number of different method
// overrides, each returning a different piece of metadata. But since we
// obtain such metadata by opening and parsing a file, it seems ridiculous to
@@ -190,6 +199,24 @@ CrashMetadataSingleton::CrashMetadataSingleton()
LLStringUtil::replaceChar(agentFullname, '_', ' ');
regionName = get_metadata(info, "CurrentRegion");
fatalMessage = get_metadata(info, "FatalMessage");
+
+ if (gDirUtilp->fileExists(gDirUtilp->getDumpLogsDirPath()))
+ {
+ LLDirIterator file_iter(gDirUtilp->getDumpLogsDirPath(), "*.log");
+ std::string file_name;
+ bool found = true;
+ while(found)
+ {
+ if((found = file_iter.next(file_name)))
+ {
+ std::string log_filename = gDirUtilp->getDumpLogsDirPath(file_name);
+ if(LLError::logFileName() != log_filename)
+ {
+ secondLogFilePathname = log_filename;
+ }
+ }
+ }
+ }
}
}