diff --git a/ASIHTTPRequest.h b/ASIHTTPRequest.h index 54dc555d..0ea9264c 100644 --- a/ASIHTTPRequest.h +++ b/ASIHTTPRequest.h @@ -10,6 +10,7 @@ // Portions are based on the ImageClient example from Apple: // See: http://developer.apple.com/samplecode/ImageClient/listing37.html +#import typedef enum _ASINetworkErrorType { ASIConnectionFailureErrorType = 1, diff --git a/ASIHTTPRequest.m b/ASIHTTPRequest.m index 9ce574bf..8b6e8aa2 100644 --- a/ASIHTTPRequest.m +++ b/ASIHTTPRequest.m @@ -386,11 +386,11 @@ - (void)cancelLoad if (receivedData) { [self setReceivedData:nil]; - - // If we were downloading to a file, let's remove it + + // If we were downloading to a file, let's remove it } else if (downloadDestinationPath) { [outputStream close]; - [[NSFileManager defaultManager] removeFileAtPath:downloadDestinationPath handler:nil]; + [[NSFileManager defaultManager] removeItemAtPath:downloadDestinationPath error:NULL]; } [self setResponseHeaders:nil];