Revision: 29544
http://sourceforge.net/p/bibdesk/svn/29544
Author: hofman
Date: 2025-09-07 17:31:31 +0000 (Sun, 07 Sep 2025)
Log Message:
-----------
combine calls to ccompletion method
Modified Paths:
--------------
trunk/bibdesk/BDSKDownloadManager.m
Modified: trunk/bibdesk/BDSKDownloadManager.m
===================================================================
--- trunk/bibdesk/BDSKDownloadManager.m 2025-09-07 17:28:13 UTC (rev 29543)
+++ trunk/bibdesk/BDSKDownloadManager.m 2025-09-07 17:31:31 UTC (rev 29544)
@@ -343,20 +343,16 @@
NSString *filename = [[webDownload response] suggestedFilename];
[downloadManager decideDestinationWithSuggestedFilename:filename
window:nil completionHandler:^(NSURL *destination){
+ NSError *error = nil;
if (destination) {
- NSError *error = nil;
if ([destination checkResourceIsReachableAndReturnError:NULL])
[[NSFileManager defaultManager] removeItemAtURL:destination
error:NULL];
- if ([[NSFileManager defaultManager] moveItemAtURL:[webDownload
fileURL] toURL:destination error:&error]) {
+ if ([[NSFileManager defaultManager] moveItemAtURL:[webDownload
fileURL] toURL:destination error:&error])
[webDownload setFileURL:destination];
- [downloadManager download:download didCompleteWithError:nil];
- } else {
- [downloadManager download:download didCompleteWithError:error];
- }
} else {
- NSError *error = [NSError errorWithDomain:NSURLErrorDomain
code:NSURLErrorCancelled userInfo:nil];
- [downloadManager download:download didCompleteWithError:error];
+ error = [NSError errorWithDomain:NSURLErrorDomain
code:NSURLErrorCancelled userInfo:nil];
}
+ [downloadManager download:download didCompleteWithError:error];
}];
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit