diff options
-rw-r--r-- | libbb/dump.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libbb/dump.c b/libbb/dump.c index 1892772..211a1ed 100644 --- a/libbb/dump.c +++ b/libbb/dump.c @@ -339,10 +339,12 @@ static NOINLINE int next(priv_dumper_t *dumper) if (fname) { dumper->argv++; - if (!freopen(fname, "r", stdin)) { - bb_simple_perror_msg(fname); - dumper->exitval = 1; - continue; + if (NOT_LONE_DASH(fname)) { + if (!freopen(fname, "r", stdin)) { + bb_simple_perror_msg(fname); + dumper->exitval = 1; + continue; + } } } else { if (dumper->next__done) |