diff options
author | Jacek Antonelli | 2009-06-13 13:22:19 -0500 |
---|---|---|
committer | Jacek Antonelli | 2009-06-13 13:22:42 -0500 |
commit | 5fd0f5edb03dc0c65fef5898d9539d957d3e9353 (patch) | |
tree | 90c391505db16915b2ce413983eefab869692c5a /linden/indra/newview/llappviewermacosx.cpp | |
parent | Second Life viewer sources 1.23.3-RC (diff) | |
download | meta-impy-5fd0f5edb03dc0c65fef5898d9539d957d3e9353.zip meta-impy-5fd0f5edb03dc0c65fef5898d9539d957d3e9353.tar.gz meta-impy-5fd0f5edb03dc0c65fef5898d9539d957d3e9353.tar.bz2 meta-impy-5fd0f5edb03dc0c65fef5898d9539d957d3e9353.tar.xz |
Second Life viewer sources 1.23.4-RC
Diffstat (limited to 'linden/indra/newview/llappviewermacosx.cpp')
-rw-r--r-- | linden/indra/newview/llappviewermacosx.cpp | 47 |
1 files changed, 22 insertions, 25 deletions
diff --git a/linden/indra/newview/llappviewermacosx.cpp b/linden/indra/newview/llappviewermacosx.cpp index 4a37503..3cd0836 100644 --- a/linden/indra/newview/llappviewermacosx.cpp +++ b/linden/indra/newview/llappviewermacosx.cpp | |||
@@ -135,31 +135,6 @@ bool LLAppViewerMacOSX::init() | |||
135 | return LLAppViewer::init(); | 135 | return LLAppViewer::init(); |
136 | } | 136 | } |
137 | 137 | ||
138 | bool LLAppViewerMacOSX::initLogging() | ||
139 | { | ||
140 | // Remove the crash stack log from previous executions. | ||
141 | // Since we've started logging a new instance of the app, we can assume | ||
142 | // The old crash stack is invalid for the next crash report. | ||
143 | char path[MAX_PATH]; | ||
144 | FSRef folder; | ||
145 | if(FSFindFolder(kUserDomain, kLogsFolderType, false, &folder) == noErr) | ||
146 | { | ||
147 | // folder is an FSRef to ~/Library/Logs/ | ||
148 | if(FSRefMakePath(&folder, (UInt8*)&path, sizeof(path)) == noErr) | ||
149 | { | ||
150 | std::string pathname = std::string(path) + std::string("/CrashReporter/"); | ||
151 | std::string mask = "Second Life*"; | ||
152 | std::string file_name; | ||
153 | while(gDirUtilp->getNextFileInDir(pathname, mask, file_name, false)) | ||
154 | { | ||
155 | LLFile::remove(pathname + file_name); | ||
156 | } | ||
157 | } | ||
158 | } | ||
159 | |||
160 | return LLAppViewer::initLogging(); | ||
161 | } | ||
162 | |||
163 | // MacOSX may add and addition command line arguement for the process serial number. | 138 | // MacOSX may add and addition command line arguement for the process serial number. |
164 | // The option takes a form like '-psn_0_12345'. The following method should be able to recognize | 139 | // The option takes a form like '-psn_0_12345'. The following method should be able to recognize |
165 | // and either ignore or return a pair of values for the option. | 140 | // and either ignore or return a pair of values for the option. |
@@ -416,6 +391,28 @@ void LLAppViewerMacOSX::handleCrashReporting(bool reportFreeze) | |||
416 | { | 391 | { |
417 | _exit(1); | 392 | _exit(1); |
418 | } | 393 | } |
394 | |||
395 | // TODO:palmer REMOVE THIS VERY SOON. THIS WILL NOT BE IN VIEWER 2.0 | ||
396 | // Remove the crash stack log from previous executions. | ||
397 | // Since we've started logging a new instance of the app, we can assume | ||
398 | // The old crash stack is invalid for the next crash report. | ||
399 | char path[MAX_PATH]; | ||
400 | FSRef folder; | ||
401 | if(FSFindFolder(kUserDomain, kLogsFolderType, false, &folder) == noErr) | ||
402 | { | ||
403 | // folder is an FSRef to ~/Library/Logs/ | ||
404 | if(FSRefMakePath(&folder, (UInt8*)&path, sizeof(path)) == noErr) | ||
405 | { | ||
406 | std::string pathname = std::string(path) + std::string("/CrashReporter/"); | ||
407 | std::string mask = "Second Life*"; | ||
408 | std::string file_name; | ||
409 | while(gDirUtilp->getNextFileInDir(pathname, mask, file_name, false)) | ||
410 | { | ||
411 | LLFile::remove(pathname + file_name); | ||
412 | } | ||
413 | } | ||
414 | } | ||
415 | |||
419 | } | 416 | } |
420 | 417 | ||
421 | std::string LLAppViewerMacOSX::generateSerialNumber() | 418 | std::string LLAppViewerMacOSX::generateSerialNumber() |