summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewermacosx.cpp
diff options
context:
space:
mode:
authorGeenz <geenz@geenzo.com>2013-02-04 18:27:47 -0500
committerGeenz <geenz@geenzo.com>2013-02-04 18:27:47 -0500
commitf3ef69ec19c3fb54d53aba1aa2ac49bc8140b591 (patch)
tree0080cdeed035458ba7627ae37f56ebe90c7c8ef1 /indra/newview/llappviewermacosx.cpp
parentbf1e9124f1530339bfa35652a3b3e329b32a3240 (diff)
Updated the crash handler to produce a CFURL which gets converted into a FSRef due to the Files.h deprecation.
Diffstat (limited to 'indra/newview/llappviewermacosx.cpp')
-rw-r--r--indra/newview/llappviewermacosx.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp
index 4141f16647..47c82975d8 100644
--- a/indra/newview/llappviewermacosx.cpp
+++ b/indra/newview/llappviewermacosx.cpp
@@ -317,12 +317,19 @@ void LLAppViewerMacOSX::handleCrashReporting(bool reportFreeze)
//command_str = "open Second Life.app/Contents/Resources/mac-crash-logger.app";
command_str = "mac-crash-logger.app/Contents/MacOS/mac-crash-logger";
+ CFURLRef urlRef = CFURLCreateFromFileSystemRepresentation(NULL, (UInt8*)command_str.c_str(), strlen(command_str.c_str()), FALSE);
+
+ // FSRef apparently isn't deprecated.
+ // There's other funcitonality that depends on it existing as well that isn't deprecated.
+ // There doesn't seem to be much to directly verify what the status of FSRef is, outside of some documentation pointing at FSRef being valid, and other documentation pointing to everything in Files.h being deprecated.
+ // We'll assume it isn't for now, since all non-deprecated functions that use it seem to assume similar.
+
FSRef appRef;
- Boolean isDir = 0;
- OSStatus os_result = FSPathMakeRef((UInt8*)command_str.c_str(),
- &appRef,
- &isDir);
- if(os_result >= 0)
+ Boolean pathstatus = CFURLGetFSRef(urlRef, &appRef);
+
+ OSStatus os_result = noErr;
+
+ if(pathstatus == true)
{
LSApplicationParameters appParams;
memset(&appParams, 0, sizeof(appParams));