From 18921bd00d97c1f160be8e778d863cd558adc51b Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Sat, 26 Oct 2002 10:05:37 +0000 Subject: A bugfix from Danny Lepage: It seems that under busybox unstable, "tar -c -f - blabla" create a tar file named "-" instead of writing to stdout. The included patch should fix this. --- archival/tar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archival/tar.c b/archival/tar.c index d8889ae..48d6ce2 100644 --- a/archival/tar.c +++ b/archival/tar.c @@ -474,7 +474,7 @@ static inline int writeTarFile(const char *tarName, const int verboseFlag, } /* Open the tar file for writing. */ - if (tarName == NULL) { + if (tarName == NULL || (tarName[0] == '-' && tarName[1] == '\0')) { tbInfo.tarFd = fileno(stdout); tbInfo.verboseFlag = verboseFlag ? 2 : 0; } else { -- cgit v1.1