Revision: 28315
http://sourceforge.net/p/bibdesk/svn/28315
Author: hofman
Date: 2023-07-14 16:27:53 +0000 (Fri, 14 Jul 2023)
Log Message:
-----------
don't pass invalid arguments when no linked files to archive
Modified Paths:
--------------
trunk/bibdesk/BibDocument.m
Modified: trunk/bibdesk/BibDocument.m
===================================================================
--- trunk/bibdesk/BibDocument.m 2023-07-14 15:42:22 UTC (rev 28314)
+++ trunk/bibdesk/BibDocument.m 2023-07-14 16:27:53 UTC (rev 28315)
@@ -1290,9 +1290,13 @@
BOOL success = [bibtexData writeToURL:bibtexURL options:0 error:outError];
if (success) {
- NSMutableArray *args = [NSMutableArray arrayWithObjects:@"-czf",
[fileURL path], bibtexFile, @"-C", commonParent, nil];
- for (filePath in localFiles)
- [args addObject:[filePath relativePathFromPath:commonParent]];
+ NSMutableArray *args = [NSMutableArray arrayWithObjects:@"-czf",
[fileURL path], bibtexFile, nil];
+ if ([localFiles count]) {
+ [args addObject:@"-C"];
+ [args addObject:commonParent];
+ for (filePath in localFiles)
+ [args addObject:[filePath relativePathFromPath:commonParent]];
+ }
NSTask *task = [[[BDSKTask alloc] init] autorelease];
[task setLaunchPath:@"/usr/bin/tar"];
[task setArguments:args];
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