From 798d367d54a6c6379ad355bd8345fa40e31e7fe9 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Sat, 6 Sep 2008 18:24:57 -0500 Subject: Second Life viewer sources 1.21.0-RC --- linden/indra/mac_updater/mac_updater.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'linden/indra/mac_updater/mac_updater.cpp') diff --git a/linden/indra/mac_updater/mac_updater.cpp b/linden/indra/mac_updater/mac_updater.cpp index 15e28ac..c2f9f4d 100644 --- a/linden/indra/mac_updater/mac_updater.cpp +++ b/linden/indra/mac_updater/mac_updater.cpp @@ -50,6 +50,8 @@ #include "MoreFilesX.h" #include "FSCopyObject.h" +#include "llerrorcontrol.h" + enum { kEventClassCustom = 'Cust', @@ -345,6 +347,16 @@ int main(int argc, char **argv) // We assume that all the logs we're looking for reside on the current drive gDirUtilp->initAppDirs("SecondLife"); + LLError::initForApplication( gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "")); + + // Rename current log file to ".old" + std::string old_log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "updater.log.old"); + std::string log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "updater.log"); + LLFile::rename(log_file.c_str(), old_log_file.c_str()); + + // Set the log file to updater.log + LLError::logToFile(log_file); + ///////////////////////////////////////// // // Process command line arguments @@ -986,7 +998,7 @@ void *updatethreadproc(void*) // NOTE: we could add -private at the end of this command line to keep the image from showing up in the Finder, // but if our cleanup fails, this makes it much harder for the user to unmount the image. - LLString mountOutput; + std::string mountOutput; FILE* mounter = popen("hdiutil attach SecondLife.dmg -mountpoint mnt", "r"); /* Flawfinder: ignore */ if(mounter == NULL) -- cgit v1.1