Check env var BreakpadMinidumpLocation first, if set, use it as BREAKPAD_DUMP_DIRECTORY.

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1201 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
yuwu@google.com 2013-07-15 18:33:10 +00:00
parent 8819ab0844
commit fce16c1856

View File

@ -327,8 +327,11 @@ bool Breakpad::ExtractParameters(NSDictionary *parameters) {
NSString *urlStr = [parameters objectForKey:@BREAKPAD_URL];
NSString *vendor =
[parameters objectForKey:@BREAKPAD_VENDOR];
NSString *dumpSubdirectory =
[parameters objectForKey:@BREAKPAD_DUMP_DIRECTORY];
// We check both parameters and the environment variable here.
char *envVarDumpSubdirectory = getenv(BREAKPAD_DUMP_DIRECTORY);
NSString *dumpSubdirectory = envVarDumpSubdirectory ?
[[NSString alloc] initWithUTF8String:envVarDumpSubdirectory] :
[parameters objectForKey:@BREAKPAD_DUMP_DIRECTORY];
NSDictionary *serverParameters =
[parameters objectForKey:@BREAKPAD_SERVER_PARAMETER_DICT];