File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -216,6 +216,26 @@ void InitCrashReporter(const std::string& process_type) {
216
216
217
217
base::FilePath dir_crash_dumps;
218
218
GetBreakpadClient ()->GetCrashDumpLocation (&dir_crash_dumps);
219
+ if (dir_crash_dumps.empty ()) {
220
+ NSArray *libraryDirectories =
221
+ NSSearchPathForDirectoriesInDomains (NSLibraryDirectory,
222
+ NSUserDomainMask,
223
+ YES );
224
+
225
+ NSString *applicationSupportDirectory =
226
+ [libraryDirectories objectAtIndex: 0 ];
227
+ NSString *library_subdirectory = [NSString
228
+ stringWithUTF8String: kDefaultLibrarySubdirectory ];
229
+
230
+ NSArray *path_components = [NSArray
231
+ arrayWithObjects: applicationSupportDirectory,
232
+ library_subdirectory,
233
+ nil ];
234
+
235
+ NSString * minidumpDir = [NSString pathWithComponents: path_components];
236
+ dir_crash_dumps = base::mac::NSStringToFilePath(minidumpDir);
237
+ }
238
+ VLOG (1 ) << " crash dump dir: " << dir_crash_dumps.value ();
219
239
[breakpad_config setObject: base: :SysUTF8ToNSString (dir_crash_dumps.value ())
220
240
forKey: @BREAKPAD_DUMP_DIRECTORY];
221
241
You can’t perform that action at this time.
0 commit comments