aboutsummaryrefslogtreecommitdiffstats
path: root/g10/import.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--g10/import.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/g10/import.c b/g10/import.c
index 8e82edec1..62ee2a46e 100644
--- a/g10/import.c
+++ b/g10/import.c
@@ -225,8 +225,20 @@ parse_import_options(char *str,unsigned int *options,int noisy)
{NULL,0,NULL,NULL}
};
int rc;
+ int saved_self_sigs_only;
+
+ /* We need to set a flag indicating wether the user has set
+ * IMPORT_SELF_SIGS_ONLY or it came from the default. */
+ saved_self_sigs_only = (*options & IMPORT_SELF_SIGS_ONLY);
+ saved_self_sigs_only &= ~IMPORT_SELF_SIGS_ONLY;
rc = parse_options (str, options, import_opts, noisy);
+
+ if (rc && (*options & IMPORT_SELF_SIGS_ONLY))
+ opt.flags.expl_import_self_sigs_only = 1;
+ else
+ *options |= saved_self_sigs_only;
+
if (rc && (*options & IMPORT_RESTORE))
{
/* Alter other options we want or don't want for restore. */