From a3e9ac39306c433e9d6c168396d823f8a2408836 Mon Sep 17 00:00:00 2001 From: Kevin Locke Date: Sun, 2 Dec 2018 13:14:50 -0700 Subject: [PATCH] Don't ignore output option without input option Previously, if the -o option was given without the -i option, it would be silently ignored. This behavior is unintuitive and undocumented. This commit changes the behavior to respect -o even without -i. Signed-off-by: Kevin Locke --- src/pixz.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pixz.c b/src/pixz.c index 0309051..bc3ad8e 100644 --- a/src/pixz.c +++ b/src/pixz.c @@ -121,7 +121,7 @@ int main(int argc, char **argv) { if (opath) usage("Multiple output files specified"); opath = argv[1]; - } else if (op != OP_LIST) { + } else if (op != OP_LIST && !opath) { iremove = true; opath = auto_output(op, argv[0]); if (!opath)