Revision: 29966
          http://sourceforge.net/p/bibdesk/svn/29966
Author:   hofman
Date:     2026-01-20 17:50:32 +0000 (Tue, 20 Jan 2026)
Log Message:
-----------
avoid indexing the same file multiple times hen resetting the file content 
search index

Modified Paths:
--------------
    trunk/bibdesk/BDSKFileSearchIndex.m

Modified: trunk/bibdesk/BDSKFileSearchIndex.m
===================================================================
--- trunk/bibdesk/BDSKFileSearchIndex.m 2026-01-20 16:49:17 UTC (rev 29965)
+++ trunk/bibdesk/BDSKFileSearchIndex.m 2026-01-20 17:50:32 UTC (rev 29966)
@@ -552,6 +552,7 @@
         
         NSMutableSet *URLsToRemove = [[NSMutableSet alloc] 
initWithArray:[signatures allKeys]];
         NSMutableSet *URLsToAdd = [[NSMutableSet alloc] init];
+        NSMutableSet *handledURLs = [[NSMutableSet alloc] init];
         NSMutableArray *itemsToAdd = [[NSMutableArray alloc] init];
         double totalObjectCount = [items count];
         
@@ -565,6 +566,8 @@
                 id signature;
                 
                 for (NSURL *url in [anItem objectForKey:BDSKBibItemURLsKey]) {
+                    if ([handledURLs containsObject:url]) continue;
+                    [handledURLs addObject:url];
                     signature = [signatures objectForKey:url];
                     if (signature)
                         [URLsToRemove removeObject: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

Reply via email to