Revision: 26900 http://sourceforge.net/p/bibdesk/svn/26900 Author: hofman Date: 2021-09-16 14:17:20 +0000 (Thu, 16 Sep 2021) Log Message: ----------- Use cocoa to resolve bookmark
Modified Paths: -------------- trunk/bibdesk/BDSKLinkedFile.m Modified: trunk/bibdesk/BDSKLinkedFile.m =================================================================== --- trunk/bibdesk/BDSKLinkedFile.m 2021-09-16 08:57:09 UTC (rev 26899) +++ trunk/bibdesk/BDSKLinkedFile.m 2021-09-16 14:17:20 UTC (rev 26900) @@ -667,8 +667,9 @@ hasRef = [alias getFSRef:&aRef baseRef:hasBaseRef ? &baseRef : NULL shouldUpdate:&shouldUpdate]; shouldUpdate = (shouldUpdate || relativePath == nil) && hasBaseRef && hasRef; } else if ([alias isKindOfClass:[NSData class]]) { - NSURL *aURL = [NSURL URLByResolvingBookmarkData:alias options:NSURLBookmarkResolutionWithoutUI relativeToURL:nil bookmarkDataIsStale:NULL error:NULL]; + NSURL *aURL = [[NSURL alloc] initByResolvingBookmarkData:alias options:NSURLBookmarkResolutionWithoutUI | NSURLBookmarkResolutionWithoutMounting relativeToURL:nil bookmarkDataIsStale:NULL error:NULL]; hasRef = BDSKPathToFSRef([aURL path], &aRef); + [aURL release]; shouldUpdate = hasBaseRef && hasRef; } } @@ -903,7 +904,7 @@ } if (refURL == nil && [alias isKindOfClass:[NSData class]]) { - aURL = (NSURL *)CFURLCreateByResolvingBookmarkData(kCFAllocatorDefault, (CFDataRef)alias, kCFURLBookmarkResolutionWithoutUIMask | kCFURLBookmarkResolutionWithoutMountingMask, NULL, NULL, (Boolean *)&shouldUpdate, NULL); + aURL = [[NSURL alloc] initByResolvingBookmarkData:alias options:NSURLBookmarkResolutionWithoutUI | NSURLBookmarkResolutionWithoutMounting relativeToURL:nil bookmarkDataIsStale:&shouldUpdate error:NULL]; if (aURL) refURL = (NSURL *)CFURLCreateFileReferenceURL(kCFAllocatorDefault, (CFURLRef)aURL, NULL); shouldUpdate = shouldUpdate && aURL != nil; 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