Revision: 28962
          http://sourceforge.net/p/bibdesk/svn/28962
Author:   hofman
Date:     2024-10-17 14:22:24 +0000 (Thu, 17 Oct 2024)
Log Message:
-----------
Include enclosing folder for linked files in archive unless files are in the 
same folder as the bibtex database

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

Modified: trunk/bibdesk/BibDocument.m
===================================================================
--- trunk/bibdesk/BibDocument.m 2024-10-17 09:25:39 UTC (rev 28961)
+++ trunk/bibdesk/BibDocument.m 2024-10-17 14:22:24 UTC (rev 28962)
@@ -1256,6 +1256,9 @@
     for (NSString *filePath in parents)
         commonParent = commonParent ? [filePath 
commonRootPathOfFile:commonParent] : filePath;
     
+    if ([localFiles count] > 1 && [commonParent 
isEqualToString:NSHomeDirectory()] == NO && [commonParent isEqualToString:[self 
basePath]] == NO && [[commonParent stringByDeletingLastPathComponent] 
isEqualToString:@"/"] == NO && [parents containsObject:commonParent])
+        commonParent = [commonParent stringByDeletingLastPathComponent];
+    
     NSData *bibtexData = [self bibTeXDataDroppingInternal:NO 
relativeToPath:commonParent error:outError];
     NSURL *bibtexURL = [dirURL URLByAppendingPathComponent:bibtexFile 
isDirectory:NO];
     BOOL success = [bibtexData writeToURL:bibtexURL options:0 error:outError];

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