Revision: 22805 http://sourceforge.net/p/bibdesk/svn/22805 Author: hofman Date: 2018-10-11 14:50:43 +0000 (Thu, 11 Oct 2018) Log Message: ----------- Standardize save target path to get base path, this can be a symlink, in which case we should take the folder of its target
Modified Paths: -------------- trunk/bibdesk/BibDocument.m Modified: trunk/bibdesk/BibDocument.m =================================================================== --- trunk/bibdesk/BibDocument.m 2018-10-11 14:35:31 UTC (rev 22804) +++ trunk/bibdesk/BibDocument.m 2018-10-11 14:50:43 UTC (rev 22805) @@ -1108,7 +1108,7 @@ // write template accessory files if necessary BDSKTemplate *selectedTemplate = [BDSKTemplate templateForStyle:typeName]; if(selectedTemplate){ - NSURL *destDirURL = [saveTargetURL URLByDeletingLastPathComponent]; + NSURL *destDirURL = [[saveTargetURL URLByStandardizingPath] URLByDeletingLastPathComponent]; for (NSURL *accessoryURL in [selectedTemplate accessoryFileURLs]) [fm copyItemAtURL:accessoryURL toURL:[destDirURL URLByAppendingPathComponent:[accessoryURL lastPathComponent]] error:NULL]; } @@ -1450,7 +1450,7 @@ if (isBibTeX){ if([[NSUserDefaults standardUserDefaults] boolForKey:BDSKAutoSortForCrossrefsKey]) [self performSortForCrossrefs]; - NSString *theBasePath = [[saveTargetURL path] stringByDeletingLastPathComponent]; + NSString *theBasePath = [[[saveTargetURL URLByStandardizingPath] path] stringByDeletingLastPathComponent]; BOOL drop = [aType isEqualToString:BDSKMinimalBibTeXDocumentType]; data = [self bibTeXDataDroppingInternal:drop relativeToPath:theBasePath error:&error]; }else if ([aType isEqualToString:BDSKRISDocumentType]){ 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