aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2020-11-12 12:09:32 +0000
committerWerner Koch <[email protected]>2020-11-12 12:11:03 +0000
commitf400ff4e7dfb424fbfcf7dfc5f80d89757ece5ab (patch)
tree8e75c53d23a48aec5d5ad9919755c1dd5a4e2d31
parentscd: Skip unknown options in command SERIALNO (diff)
downloadgnupg-f400ff4e7dfb424fbfcf7dfc5f80d89757ece5ab.tar.gz
gnupg-f400ff4e7dfb424fbfcf7dfc5f80d89757ece5ab.zip
gpgconf: Yet another fix for --apply-profile.
* tools/gpgconf.c (main): Use gnupg_homedir instead of default_homedir. Check for existance of the directory. -- Fixes-commit: 1fbf085bc8b4a92772d1da8bfea507f4f97434b1 Signed-off-by: Werner Koch <[email protected]>
-rw-r--r--tools/gpgconf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/gpgconf.c b/tools/gpgconf.c
index 7633c5e54..b6afc8b0e 100644
--- a/tools/gpgconf.c
+++ b/tools/gpgconf.c
@@ -781,16 +781,16 @@ main (int argc, char **argv)
es_putc ('\n', es_stderr);
gpgconf_failure (GPG_ERR_USER_2);
}
- if (!opt.dry_run)
- gnupg_maybe_make_homedir (default_homedir (), opt.quiet);
+ if (!opt.dry_run && gnupg_access (gnupg_homedir (), F_OK))
+ gnupg_maybe_make_homedir (gnupg_homedir (), opt.quiet);
gc_component_retrieve_options (-1);
if (gc_process_gpgconf_conf (NULL, 1, 1, NULL))
gpgconf_failure (0);
break;
case aApplyProfile:
- if (!opt.dry_run)
- gnupg_maybe_make_homedir (default_homedir (), opt.quiet);
+ if (!opt.dry_run && gnupg_access (gnupg_homedir (), F_OK))
+ gnupg_maybe_make_homedir (gnupg_homedir (), opt.quiet);
gc_component_retrieve_options (-1);
if (gc_apply_profile (fname))
gpgconf_failure (0);