Revision: 28397
http://sourceforge.net/p/bibdesk/svn/28397
Author: hofman
Date: 2023-10-06 09:19:11 +0000 (Fri, 06 Oct 2023)
Log Message:
-----------
values in array are checked to be non-nil
Modified Paths:
--------------
trunk/bibdesk/BDSKFiler.m
Modified: trunk/bibdesk/BDSKFiler.m
===================================================================
--- trunk/bibdesk/BDSKFiler.m 2023-10-06 09:09:21 UTC (rev 28396)
+++ trunk/bibdesk/BDSKFiler.m 2023-10-06 09:19:11 UTC (rev 28397)
@@ -190,8 +190,8 @@
// file the i'th paper
id paperInfo = [paperInfos objectAtIndex:i];
+ BibItem *pub = [paperInfo valueForKey:BDSKFilerPublicationKey];
BDSKLinkedFile *file = [paperInfo valueForKey:BDSKFilerFileKey];
- BibItem *pub = [paperInfo valueForKey:BDSKFilerPublicationKey];
BDSKFilerError ignoredError = (options & BDSKAutoFileOptionForce)
? [[paperInfo valueForKey:BDSKFilerFlagKey] integerValue] : BDSKFilerErrorNone;
NSString *oldPath = nil;
NSString *newPath = nil;
@@ -222,11 +222,11 @@
} else {
NSMutableDictionary *info = [NSMutableDictionary
dictionaryWithCapacity:6];
+ [info setValue:pub forKey:BDSKFilerPublicationKey];
[info setValue:file forKey:BDSKFilerFileKey];
[info setValue:oldPath forKey:BDSKFilerOldPathKey];
[info setValue:newPath forKey:BDSKFilerNewPathKey];
- [info setValue:pub forKey:BDSKFilerPublicationKey];
-
+
if ((options & BDSKAutoFileOptionCheckComplete) &&
(ignoredError & BDSKFilerErrorIncompleteFields) == 0 && NO == (isLinkedFiles ?
[pub canSetURLForLinkedFile:file] : [pub canSetURLForField:field])) {
[info setValue:NSLocalizedString(@"Incomplete information
to generate file name.",@"") forKey:BDSKFilerStatusKey];
@@ -251,8 +251,8 @@
} else {
[doc runScriptHookWithName:BDSKScriptHookNameWillAutoFile
- forPublications:[NSArray arrayWithObject:pub]
- field:field oldValues:[NSArray
arrayWithObject:oldPath] newValues:[NSArray arrayWithObject:newPath]
+ forPublications:@[pub]
+ field:field oldValues:@[oldPath] newValues:@[newPath]
completionHandler:^(BOOL cancelled){
NSDictionary *errorInfo = nil;
@@ -282,8 +282,8 @@
}
[doc
runScriptHookWithName:BDSKScriptHookNameDidAutoFile
- forPublications:[NSArray arrayWithObject:pub]
- field:field oldValues:[NSArray
arrayWithObject:oldPath] newValues:[NSArray arrayWithObject:newPath]];
+ forPublications:@[pub]
+ field:field oldValues:@[oldPath]
newValues:@[newPath]];
}
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