From f3d5502a1325422fb5956c678ef52f4c4f872ab9 Mon Sep 17 00:00:00 2001 From: "ted.mielczarek@gmail.com" Date: Tue, 24 Jul 2007 18:06:11 -0700 Subject: [PATCH] bustage fix from bug 378581, patch by Dave Camp , r=me --- toolkit/crashreporter/client/crashreporter_osx.mm | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/toolkit/crashreporter/client/crashreporter_osx.mm b/toolkit/crashreporter/client/crashreporter_osx.mm index 095dd7be3471..def9fd3ba09d 100644 --- a/toolkit/crashreporter/client/crashreporter_osx.mm +++ b/toolkit/crashreporter/client/crashreporter_osx.mm @@ -284,14 +284,15 @@ bool UIGetSettingsPath(const string& vendor, const string& product, string& settingsPath) { - NSArray* paths; - paths = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, - NSUserDomainMask, - YES); - if ([paths count] < 1) + FSRef foundRef; + OSErr err = FSFindFolder(kUserDomain, kApplicationSupportFolderType, + kCreateFolder, &foundRef); + if (err != noErr) return false; - NSString* destPath = [paths objectAtIndex:0]; + unsigned char path[PATH_MAX]; + FSRefMakePath(&foundRef, path, sizeof(path)); + NSString* destPath = [NSString stringWithUTF8String:reinterpret_cast(path)]; // Note that MacOS ignores the vendor when creating the profile hierarchy - // all application preferences directories live alongside one another in