Revision: 26799 http://sourceforge.net/p/bibdesk/svn/26799 Author: hofman Date: 2021-09-04 14:20:51 +0000 (Sat, 04 Sep 2021) Log Message: ----------- Pass NULL when we don't find a base ref
Modified Paths: -------------- trunk/bibdesk/BDSKLinkedFile.m Modified: trunk/bibdesk/BDSKLinkedFile.m =================================================================== --- trunk/bibdesk/BDSKLinkedFile.m 2021-09-04 14:05:49 UTC (rev 26798) +++ trunk/bibdesk/BDSKLinkedFile.m 2021-09-04 14:20:51 UTC (rev 26799) @@ -622,15 +622,16 @@ - (NSData *)aliasDataRelativeToPath:(NSString *)basePath; { - FSRef baseRef; BDSKAlias *anAlias = NULL; NSData *data = nil; if (fileRef) { + FSRef baseRef; BOOL hasBaseRef = BDSKPathToFSRef(basePath, &baseRef); - anAlias = [BDSKAlias newWithFSRef:fileRef baseRef:&baseRef]; + anAlias = [BDSKAlias newWithFSRef:fileRef baseRef:hasBaseRef ? &baseRef : NULL]; } else if (relativePath && basePath) { - anAlias = [BDSKAlias newWithPath:([relativePath isAbsolutePath] ? relativePath : [basePath stringByAppendingPathComponent:relativePath]) basePath:basePath]; + NSString *path = [relativePath isAbsolutePath] ? relativePath : [basePath stringByAppendingPathComponent:relativePath]; + anAlias = [BDSKAlias newWithPath:path basePath:basePath]; } if (anAlias != NULL) { data = [anAlias data]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. _______________________________________________ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit