In iOS, BREAKPAD_OUTPUT_DUMP_FILE value contains a malformed full path to the dump file.

The std::string dumpFilename already contains the full pathname to the dump file.  Appending it to the dumpDirAsNSString creates a string with the path portion duplicated, e.g.:

/var/mobile/Applications/516BE756-DFD4-4F9B-85D5-85966B0038F7/Library/Caches/Breakpad/var/mobile/Applications/516BE756-DFD4-4F9B-85D5-85966B0038F7/Library/Caches/Breakpad/0A406D28-437D-48EE-9989-23F7F871818E.dmp

Instead of this:

/var/mobile/Applications/516BE756-DFD4-4F9B-85D5-85966B0038F7/Library/Caches/Breakpad/0A406D28-437D-48EE-9989-23F7F871818E.dmp

R=markus@chromium.org, qsr@chromium.org

Review URL: https://breakpad.appspot.com/744002

Patch from Akiva <scirsw@gmail.com>.

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1237 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
qsr@chromium.org 2013-11-26 10:38:55 +00:00
parent e9165f4353
commit f546e072ce

View file

@ -519,8 +519,7 @@ NSDictionary *Breakpad::GenerateReport(NSDictionary *server_parameters) {
// Handle results. // Handle results.
NSMutableDictionary *result = [NSMutableDictionary dictionary]; NSMutableDictionary *result = [NSMutableDictionary dictionary];
NSString *dumpFullPath = [dumpDirAsNSString stringByAppendingPathComponent: NSString *dumpFullPath = [NSString stringWithUTF8String:dumpFilename.c_str()];
[NSString stringWithUTF8String:dumpFilename.c_str()]];
[result setValue:dumpFullPath [result setValue:dumpFullPath
forKey:@BREAKPAD_OUTPUT_DUMP_FILE]; forKey:@BREAKPAD_OUTPUT_DUMP_FILE];
[result setValue:[NSString stringWithUTF8String:config_file.GetFilePath()] [result setValue:[NSString stringWithUTF8String:config_file.GetFilePath()]