From cf926593f54978fafd14e4cb4456fece54fb4db2 Mon Sep 17 00:00:00 2001 From: Andreas Linde Date: Sun, 4 May 2014 17:55:00 +0200 Subject: [PATCH] Don't delete all crash reports when the user denies to send the latest one --- Classes/BITCrashManager.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Classes/BITCrashManager.m b/Classes/BITCrashManager.m index 226ae9bf3c..83d52da796 100644 --- a/Classes/BITCrashManager.m +++ b/Classes/BITCrashManager.m @@ -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: