aboutsummaryrefslogtreecommitdiff
path: root/archival/tar.c
diff options
context:
space:
mode:
Diffstat (limited to 'archival/tar.c')
-rw-r--r--archival/tar.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/archival/tar.c b/archival/tar.c
index d8889ae19..48d6ce22e 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 {