Revision: 27522
http://sourceforge.net/p/bibdesk/svn/27522
Author: hofman
Date: 2022-06-01 23:23:32 +0000 (Wed, 01 Jun 2022)
Log Message:
-----------
Don't migrate local file and URL fields in external groups
Modified Paths:
--------------
trunk/bibdesk/BibItem.m
Modified: trunk/bibdesk/BibItem.m
===================================================================
--- trunk/bibdesk/BibItem.m 2022-06-01 23:20:49 UTC (rev 27521)
+++ trunk/bibdesk/BibItem.m 2022-06-01 23:23:32 UTC (rev 27522)
@@ -4133,10 +4133,10 @@
[pubFields setObject:[unresolvedURLs objectAtIndex:i]
forKey:[NSString stringWithFormat:@"Bdsk-Url-%lu", (unsigned long)(i + 1)]];
}
- NSUserDefaults*sud = [NSUserDefaults standardUserDefaults];
+ NSUserDefaults *sud = [NSUserDefaults standardUserDefaults];
- if (0 == [files count] && [sud boolForKey:BDSKUseLocalUrlAndUrlKey] == NO
&& [sud boolForKey:BDSKAutomaticallyConvertURLFieldsKey]) {
- NSInteger added;
+ if (0 == [files count] && [sud boolForKey:BDSKUseLocalUrlAndUrlKey] == NO
&& [sud boolForKey:BDSKAutomaticallyConvertURLFieldsKey] && [[self owner]
isDocument]) {
+ NSInteger added = NO;
BDSKRemoveFieldsOption removeMask = BDSKRemoveNoFields;
if ([sud boolForKey:BDSKRemoveConvertedLocalFileFieldsKey])
removeMask |= BDSKRemoveLocalFileFields;
@@ -4144,7 +4144,7 @@
removeMask |= BDSKRemoveRemoteURLFields;
[self migrateFilesWithRemoveOptions:removeMask
numberOfAddedFiles:&added numberOfRemovedFields:NULL error:NULL];
// Don't post this unless the owner is a document. At present, if we
open a URL group using a local file on disk that has valid URLs, this method
will be called and it will end up with BDSKLinkedFile instances. If we then
click the "Import" button in the document, no warning is displayed because we
don't call migrateFilesAndRemove:... again.
- if (added > 0 && [[self owner] isDocument]) {
+ if (added > 0) {
NSNotification *note = [NSNotification
notificationWithName:BDSKTemporaryFileMigrationNotification object:[self
owner]];
[[NSNotificationQueue defaultQueue] enqueueNotification:note
postingStyle:NSPostNow coalesceMask:NSNotificationCoalescingOnName
forModes:[NSArray arrayWithObject:NSDefaultRunLoopMode]];
}
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