aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libbb/dump.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/libbb/dump.c b/libbb/dump.c
index 189277297..211a1ed9e 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)