Bug 1076977: Get crashreporter to work with the new v2 bundle structure on OSX. r=bsmedberg
authorStephen Pohl <spohl.mozilla.bugs@gmail.com>
Fri, 03 Oct 2014 10:29:38 -0400
changeset 231921 4e05fcdee48f8a54dc27ca4e11ec66e70896fa9a
parent 231920 7a45d556f280831c80ec0d510e4b91160955ae66
child 231922 d5290c0ca86ee534fb836a9b6255128a3bed22db
push id4187
push userbhearsum@mozilla.com
push dateFri, 28 Nov 2014 15:29:12 +0000
treeherdermozilla-beta@f23cc6a30c11 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg
bugs1076977
milestone35.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1076977: Get crashreporter to work with the new v2 bundle structure on OSX. r=bsmedberg
toolkit/crashreporter/client/crashreporter_osx.mm
--- a/toolkit/crashreporter/client/crashreporter_osx.mm
+++ b/toolkit/crashreporter/client/crashreporter_osx.mm
@@ -802,19 +802,24 @@ void UIError_impl(const string& message)
   }
 
   [gUI showErrorUI: message];
   [NSApp run];
 }
 
 bool UIGetIniPath(string& path)
 {
-  path = gArgv[0];
-  path.append(".ini");
-
+  NSString* tmpPath = [NSString stringWithUTF8String:gArgv[0]];
+  NSString* iniName = [tmpPath lastPathComponent];
+  iniName = [iniName stringByAppendingPathExtension:@"ini"];
+  tmpPath = [tmpPath stringByDeletingLastPathComponent];
+  tmpPath = [tmpPath stringByDeletingLastPathComponent];
+  tmpPath = [tmpPath stringByAppendingPathComponent:@"Resources"];
+  tmpPath = [tmpPath stringByAppendingPathComponent:iniName];
+  path = [tmpPath UTF8String];
   return true;
 }
 
 bool UIGetSettingsPath(const string& vendor,
                        const string& product,
                        string& settingsPath)
 {
   FSRef foundRef;