Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixing #456514: Appcast download crashes on 10.5 if download fails

  • Loading branch information...
commit bd80144c7b67b7a66c215e40174dfb9310843573 1 parent af37928
@andymatuschak andymatuschak authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 SUAppcast.m
View
7 SUAppcast.m
@@ -180,11 +180,14 @@ - (void)downloadDidFinish:(NSURLDownload *)download
- (void)download:(NSURLDownload *)download didFailWithError:(NSError *)error
{
CFRelease(download);
+ if (downloadFilename)
+ {
#if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4
- [[NSFileManager defaultManager] removeFileAtPath:downloadFilename handler:nil];
+ [[NSFileManager defaultManager] removeFileAtPath:downloadFilename handler:nil];
#else
- [[NSFileManager defaultManager] removeItemAtPath:downloadFilename error:NULL];
+ [[NSFileManager defaultManager] removeItemAtPath:downloadFilename error:NULL];
#endif
+ }
[downloadFilename release];
downloadFilename = nil;
Please sign in to comment.
Something went wrong with that request. Please try again.