summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewermacosx.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2021-11-19 04:45:15 +0200
committerAndrey Lihatskiy <alihatskiy@productengine.com>2021-11-19 04:45:15 +0200
commit49dd88e86c8e5939fbd82d5a5316c36ade262ca2 (patch)
treef66707306782df4229657cdc4fb25fe70ab0bd18 /indra/newview/llappviewermacosx.cpp
parent5649bb0c2297e4597fd2c904f0e8bb3db8051240 (diff)
parent9957c28ddc5e5c129af2db662da7d69f1509af65 (diff)
Merge branch 'master' into DRTVWR-540-maint
# Conflicts: # indra/newview/llfloatereditextdaycycle.cpp # indra/newview/llviewerinput.cpp
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;
+ }
+ }
+ }
+ }
}
}