@@ -3622,7 +3622,10 @@ void LLAppViewer::writeSystemInfo()
36223622 if (! gDebugInfo .has (" Dynamic" ) )
36233623 gDebugInfo [" Dynamic" ] = LLSD::emptyMap ();
36243624
3625- #if LL_WINDOWS && !LL_BUGSPLAT
3625+ #if LL_DARWIN
3626+ // crash processing in CrashMetadataSingleton reads SLLog
3627+ gDebugInfo [" SLLog" ] = gDirUtilp ->getExpandedFilename (LL_PATH_LOGS," SecondLife.crash" );
3628+ #elif LL_WINDOWS && !LL_BUGSPLAT
36263629 gDebugInfo [" SLLog" ] = gDirUtilp ->getExpandedFilename (LL_PATH_DUMP," SecondLife.log" );
36273630#else
36283631 // Far from ideal, especially when multiple instances get involved.
@@ -4034,6 +4037,22 @@ void LLAppViewer::processMarkerFiles()
40344037 }
40354038 LLAPRFile::remove (error_marker_file);
40364039 }
4040+
4041+ #if LL_DARWIN
4042+ if (!mSecondInstance && gLastExecEvent != LAST_EXEC_NORMAL)
4043+ {
4044+ // While windows reports crashes immediately, mac reports next run and
4045+ // may take a while to trigger crash report so it has a special file.
4046+ // Remove .crash file if exists
4047+ std::string old_log_file = gDirUtilp ->getExpandedFilename (LL_PATH_LOGS,
4048+ " SecondLife.old" );
4049+ std::string crash_log_file = gDirUtilp ->getExpandedFilename (LL_PATH_LOGS,
4050+ " SecondLife.crash" );
4051+ LLFile::remove (crash_log_file);
4052+ // Rename ".old" log file to ".crash"
4053+ LLFile::rename (old_log_file, crash_log_file);
4054+ }
4055+ #endif
40374056}
40384057
40394058void LLAppViewer::removeMarkerFiles ()
0 commit comments