Closed Bug 1795324 Opened 2 years ago Closed 2 years ago

Stop using deprecated FSFindFolder in crashreporter_osx.mm

Categories

(Toolkit :: Crash Reporting, task)

Unspecified
macOS
task

Tracking

()

RESOLVED FIXED
108 Branch
Tracking Status
firefox108 --- fixed

People

(Reporter: longsonr, Assigned: longsonr)

Details

Attachments

(1 file)

No description provided.
Assignee: nobody → longsonr
Status: NEW → ASSIGNED

The following command line program shows that the output is the same...

#import <Foundation/Foundation.h>

int main(int argc, const char * argv[]) {
  @autoreleasepool {
    {
      FSRef foundRef;
      OSErr err = FSFindFolder(kUserDomain, kApplicationSupportFolderType, kCreateFolder, &foundRef);
      if (err != noErr) return false;
      
      unsigned char path[PATH_MAX];
      FSRefMakePath(&foundRef, path, sizeof(path));
      NSString* destPath = [NSString stringWithUTF8String:(char *)path];
      // insert code here...
      NSLog(@"%@", destPath);
    }
    {
      NSArray *paths = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES);
      NSString *destPath = [paths firstObject];
      NSLog(@"%@", destPath);
    }
  }
  return 0;
}

2022-10-14 16:16:36.475034+0100 TestBed[39364:6455661] /Users/<user name>/Library/Application Support
2022-10-14 16:16:36.475837+0100 TestBed[39364:6455661] /Users/<user name>/Library/Application Support
Program ended with exit code: 0

Pushed by longsonr@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/cba1054f7796
replace deprecated FSFindFolder in crashreporter r=mstange
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 108 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: