Revision: 27611
http://sourceforge.net/p/bibdesk/svn/27611
Author: hofman
Date: 2022-06-12 08:33:04 +0000 (Sun, 12 Jun 2022)
Log Message:
-----------
compare migrated URLs by lowercase absolute string, so we don't duplicate with
different casing
Modified Paths:
--------------
trunk/bibdesk/BibItem.m
Modified: trunk/bibdesk/BibItem.m
===================================================================
--- trunk/bibdesk/BibItem.m 2022-06-12 06:30:19 UTC (rev 27610)
+++ trunk/bibdesk/BibItem.m 2022-06-12 08:33:04 UTC (rev 27611)
@@ -3052,13 +3052,20 @@
{
conversionContext *ctxt = (conversionContext *)context;
BibItem *self = ctxt->publication;
- NSArray *currentURLs = [self valueForKeyPath:@"files.URL"];
// this function is called for all local & remote URL fields, whether or
not they have a value
NSURL *urlValue = [self URLForField:(id)key];
if (urlValue) {
// see if this file was converted previously to avoid duplication
- BOOL converted = [currentURLs containsObject:urlValue];
+ NSArray *currentURLs = [self
valueForKeyPath:@"files.URL.absoluteString.lowercaseString"];
+ NSString *urlString = [[urlValue absoluteString] lowercaseString];
+ BOOL converted = NO;
+ for (BDSKLinkedFile *file in [self files]) {
+ if ([[[[file URL] absoluteString] lowercaseString]
isEqualToString:urlString]) {
+ converted = YES;
+ break;
+ }
+ }
if (converted == NO) {
BDSKLinkedFile *file = [[BDSKLinkedFile alloc]
initWithURL:urlValue delegate:self];
NSURL *fileURL = [file URL];
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