From 4965f362d1d6d38c72d7a8aa08a75b7e943fb4c4 Mon Sep 17 00:00:00 2001 From: "ted.mielczarek@gmail.com" Date: Tue, 15 May 2007 12:00:23 -0700 Subject: [PATCH] bustage fix from bug 378581, patch by Dave Camp , r=me --- toolkit/airbag/client/crashreporter_osx.mm | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/toolkit/airbag/client/crashreporter_osx.mm b/toolkit/airbag/client/crashreporter_osx.mm index 095dd7be3471..def9fd3ba09d 100644 --- a/toolkit/airbag/client/crashreporter_osx.mm +++ b/toolkit/airbag/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