diff options
-rw-r--r-- | archival/tar.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/archival/tar.c b/archival/tar.c index 88a815d..e6c134e 100644 --- a/archival/tar.c +++ b/archival/tar.c @@ -694,7 +694,9 @@ int tar_main(int argc, char **argv) } } - if (*argv[optind] == '-') { + /* Check if we are reading from stdin */ + if ((argv[optind]) && (*argv[optind] == '-')) { + /* Default is to read from stdin, so just skip to next arg */ optind++; } |