diff options
author | Eric Andersen | 2002-10-26 10:05:37 +0000 |
---|---|---|
committer | Eric Andersen | 2002-10-26 10:05:37 +0000 |
commit | 18921bd00d97c1f160be8e778d863cd558adc51b (patch) | |
tree | ec74d3ae251679805e5ee667196de55a82b8f096 | |
parent | 5ad22c933ca587510a1980f5277812061cbab03c (diff) | |
download | busybox-18921bd00d97c1f160be8e778d863cd558adc51b.zip busybox-18921bd00d97c1f160be8e778d863cd558adc51b.tar.gz |
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.
-rw-r--r-- | archival/tar.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 { |