From f24335d7901b040365b4934c5fc0ce8f7d694f18 Mon Sep 17 00:00:00 2001
From: "Andrew A. de Laix" <alain@lindenlab.com>
Date: Tue, 1 Jun 2010 14:07:20 -0700
Subject: [PATCH] Fix log file inclusion; include SecondLife.log on crash, but
 SecondLife.old on freeze.

---
 indra/llcrashlogger/llcrashlogger.cpp | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/indra/llcrashlogger/llcrashlogger.cpp b/indra/llcrashlogger/llcrashlogger.cpp
index aa2ea17af9c..078795f962c 100755
--- a/indra/llcrashlogger/llcrashlogger.cpp
+++ b/indra/llcrashlogger/llcrashlogger.cpp
@@ -190,12 +190,16 @@ void LLCrashLogger::gatherFiles()
 		mFileMap["SettingsXml"] = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS,"settings.xml");
 	}
 
-	// Replace the log file ext with .old, since the 
-	// instance that launched this process has overwritten
-	// SecondLife.log
-	std::string log_filename = mFileMap["SecondLifeLog"];
-	log_filename.replace(log_filename.size() - 4, 4, ".old");
-	mFileMap["SecondLifeLog"] = log_filename;
+	if(mCrashInPreviousExec)
+	{
+		// Restarting after freeze.
+		// Replace the log file ext with .old, since the 
+		// instance that launched this process has overwritten
+		// SecondLife.log
+		std::string log_filename = mFileMap["SecondLifeLog"];
+		log_filename.replace(log_filename.size() - 4, 4, ".old");
+		mFileMap["SecondLifeLog"] = log_filename;
+	}
 
 	gatherPlatformSpecificFiles();
 
-- 
GitLab