diff --git a/PTDownloadManager/PTFile.m b/PTDownloadManager/PTFile.m index afd5ef8..1577f72 100644 --- a/PTDownloadManager/PTFile.m +++ b/PTDownloadManager/PTFile.m @@ -98,7 +98,7 @@ - (NSOperation *)downloadWithProgressOnView:(UIView *)view NSMutableDictionary *urls = [[[PTDownloadManager sharedManager] libraryInfo] objectForKey:kPTLibraryInfoRequestURLStringsKey]; ASIHTTPRequest *downloadOperation = [[ASIHTTPRequest alloc] initWithURL:[NSURL URLWithString:[urls objectForKey:self.name]]]; - downloadOperation.temporaryFileDownloadPath = [[[[PTDownloadManager sharedManager] diskCachePath] stringByAppendingPathComponent:self.name] stringByAppendingPathExtension:@"download"]; + downloadOperation.temporaryFileDownloadPath = [[NSTemporaryDirectory() stringByAppendingPathComponent:self.name] stringByAppendingPathExtension:@"download"]; downloadOperation.downloadDestinationPath = [[[PTDownloadManager sharedManager] fileDownloadPath] stringByAppendingPathComponent:self.name]; downloadOperation.allowResumeForFileDownloads = YES; downloadOperation.shouldContinueWhenAppEntersBackground = YES;