Revision: 22778 http://sourceforge.net/p/bibdesk/svn/22778 Author: hofman Date: 2018-10-09 14:42:16 +0000 (Tue, 09 Oct 2018) Log Message: ----------- use default local file option to set field value from auto file
Modified Paths: -------------- trunk/bibdesk/BDSKFiler.m Modified: trunk/bibdesk/BDSKFiler.m =================================================================== --- trunk/bibdesk/BDSKFiler.m 2018-10-09 14:39:02 UTC (rev 22777) +++ trunk/bibdesk/BDSKFiler.m 2018-10-09 14:42:16 UTC (rev 22778) @@ -240,15 +240,7 @@ [pub noteFilesChanged:YES]; } else if (initial) { // if this is not an initial move, undo should take care of this - NSString *value = [pub valueOfField:field inherit:NO]; - if ([value hasCaseInsensitivePrefix:@"file://"]) - value = [[NSURL fileURLWithPath:newPath] absoluteString]; - else if ([value isAbsolutePath] == NO && [doc fileURL]) - value = [value relativePathFromPath:[[[doc fileURL] URLByDeletingLastPathComponent] path]]; - else if ([value hasPrefix:@"~"]) - value = [newPath stringByAbbreviatingWithTildeInPath]; - else - value = newPath; + NSString *value = [pub fieldValueForFileURL:[NSURL fileURLWithPath:newPath] withFormat:[[NSUserDefaults standardUserDefaults] integerForKey:BDSKLocalFileOptionKey]]; [pub setField:field toValue:value]; } 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