Don't delete all crash reports when the user denies to send the latest one

This commit is contained in:
Andreas Linde
2014-05-04 17:55:00 +02:00
parent 2155f5f93b
commit cf926593f5

View File

@@ -268,6 +268,8 @@ static PLCrashReporterCallbacks plCrashCallbacks = {
/**
* Remove all crash reports and stored meta data for each from the file system and keychain
*
* This is currently only used as a helper method for tests
*/
- (void)cleanCrashReports {
for (NSUInteger i=0; i < [_crashFiles count]; i++) {
@@ -696,7 +698,7 @@ static PLCrashReporterCallbacks plCrashCallbacks = {
[self.delegate crashManagerWillCancelSendingCrashReport:self];
}
[self cleanCrashReports];
[self cleanCrashReportWithFilename:[_crashesDir stringByAppendingPathComponent: _lastCrashFilename]];
return YES;
case BITCrashManagerUserInputSend: