summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 {