summaryrefslogtreecommitdiff
path: root/archival
diff options
context:
space:
mode:
authorEric Andersen2002-10-26 10:05:37 +0000
committerEric Andersen2002-10-26 10:05:37 +0000
commit18921bd00d97c1f160be8e778d863cd558adc51b (patch)
treeec74d3ae251679805e5ee667196de55a82b8f096 /archival
parent5ad22c933ca587510a1980f5277812061cbab03c (diff)
downloadbusybox-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.
Diffstat (limited to 'archival')
-rw-r--r--archival/tar.c2
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 {