From a0a9d682cac046c19a72e1b8043bdf81bdb4d694 Mon Sep 17 00:00:00 2001 From: Andrew Wood Date: Tue, 23 Sep 2025 05:45:43 +0100 Subject: [PATCH] Reject "-o" when using "-d". --- src/main/options.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/options.c b/src/main/options.c index 1c38611..e3c9fc9 100644 --- a/src/main/options.c +++ b/src/main/options.c @@ -795,6 +795,15 @@ opts_t opts_parse(unsigned int argc, char **argv) /*@+mustfreefresh@ */ } + if (NULL != opts->output) { + /*@-mustfreefresh@ *//* see above */ + fprintf(stderr, "%s: -o: %s\n", opts->program_name, + _("cannot transfer files when watching file descriptors")); + opts_free(opts); + return NULL; + /*@+mustfreefresh@ */ + } + /* Accept additional pid[:fd] arguments. */ while (optind < (int) argc) { parse_pid = 0;