Revision: 28398
http://sourceforge.net/p/bibdesk/svn/28398
Author: hofman
Date: 2023-10-06 09:23:50 +0000 (Fri, 06 Oct 2023)
Log Message:
-----------
add an assert for non-nil pub and get it from linked file as safety valve
Modified Paths:
--------------
trunk/bibdesk/BDSKFiler.m
Modified: trunk/bibdesk/BDSKFiler.m
===================================================================
--- trunk/bibdesk/BDSKFiler.m 2023-10-06 09:19:11 UTC (rev 28397)
+++ trunk/bibdesk/BDSKFiler.m 2023-10-06 09:23:50 UTC (rev 28398)
@@ -190,12 +190,14 @@
// 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] ?:
[file delegate];
BDSKFilerError ignoredError = (options & BDSKAutoFileOptionForce)
? [[paperInfo valueForKey:BDSKFilerFlagKey] integerValue] : BDSKFilerErrorNone;
NSString *oldPath = nil;
NSString *newPath = nil;
-
+
+ BDSKASSERT(pub != nil);
+
if ((options & BDSKAutoFileOptionGenerate) == 0) // new path
provided, e.g. undo
newPath = [paperInfo valueForKey:BDSKFilerNewPathKey];
else if (isLinkedFiles) // initial auto file of file
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