Revision: 29567
http://sourceforge.net/p/bibdesk/svn/29567
Author: hofman
Date: 2025-09-09 15:55:48 +0000 (Tue, 09 Sep 2025)
Log Message:
-----------
call block in once place
Modified Paths:
--------------
trunk/bibdesk/BDSKDownloadManager.m
Modified: trunk/bibdesk/BDSKDownloadManager.m
===================================================================
--- trunk/bibdesk/BDSKDownloadManager.m 2025-09-09 15:16:58 UTC (rev 29566)
+++ trunk/bibdesk/BDSKDownloadManager.m 2025-09-09 15:55:48 UTC (rev 29567)
@@ -264,8 +264,9 @@
[sPanel setDirectoryURL:downloadsURL];
void (^handler)(NSModalResponse) = ^(NSModalResponse result){
+ NSURL *fileURL = nil;
if (result == NSModalResponseOK) {
- NSURL *fileURL = [sPanel URL];
+ fileURL = [sPanel URL];
// if a file exists, the user should have confirmed to overwrite
if ([fileURL checkResourceIsReachableAndReturnError:NULL]) {
NSURL *tmpURL = [[NSFileManager defaultManager]
temporaryFileURLWithBasename:[fileURL lastPathComponent]];
@@ -272,10 +273,8 @@
if ([[NSFileManager defaultManager] moveItemAtURL:fileURL
toURL:tmpURL error:NULL])
[[self webDownloadForDownload:download]
setTempFileURL:tmpURL];
}
- completionHandler(fileURL);
- } else {
- completionHandler(nil);
}
+ completionHandler(fileURL);
};
if (window)
[sPanel beginSheetModalForWindow:window completionHandler:handler];
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