diff --git a/common/argparse.c b/common/argparse.c index fb2bc6556..b63f800e8 100644 --- a/common/argparse.c +++ b/common/argparse.c @@ -1344,6 +1344,17 @@ gnupg_argparse (estream_t fp, gnupg_argparse_t *arg, gnupg_opt_t *opts_orig) xfree (buffer); else gpgrt_annotate_leaked_object (buffer); + /* If the caller wants us to return the attributes or + * ignored options, or these flags in. */ + if ((arg->flags & ARGPARSE_FLAG_WITHATTR)) + { + if (opts[idx].ignore) + arg->r_type |= ARGPARSE_ATTR_IGNORE; + if (opts[idx].forced) + arg->r_type |= ARGPARSE_ATTR_FORCE; + if (set_ignore) + arg->r_type |= ARGPARSE_OPT_IGNORE; + } } } goto leave;