summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewermacosx.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2021-11-16 01:09:11 +0200
committerAndrey Lihatskiy <alihatskiy@productengine.com>2021-11-16 01:09:11 +0200
commit30c381406c4891cce439c66ca17b26247f0a698c (patch)
tree2196833344c813e2d6bf4b963adc517c30050697 /indra/newview/llappviewermacosx.cpp
parent764788c9bc549715aed119c639ac919067f38a92 (diff)
parent9957c28ddc5e5c129af2db662da7d69f1509af65 (diff)
Merge branch 'master' into DRTVWR-530-maint
# Conflicts: # doc/contributions.txt
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;
+ }
+ }
+ }
+ }
}
}