summaryrefslogtreecommitdiffstats
path: root/g10/migrate.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2016-06-07 10:59:46 +0200
committerWerner Koch <wk@gnupg.org>2016-06-07 10:59:46 +0200
commit22a7ef01aa2c0eb77bcc40174d09104acc35cab1 (patch)
tree3782b20549fcc48d2598128676227d9a16f785b6 /g10/migrate.c
parentpo: Update Japanese translation. (diff)
downloadgnupg2-22a7ef01aa2c0eb77bcc40174d09104acc35cab1.tar.xz
gnupg2-22a7ef01aa2c0eb77bcc40174d09104acc35cab1.zip
Replace use of opt.homedir by accessor functions.
* common/homedir.c (the_gnupg_homedir): New var. (gnupg_set_homedir): New. (gnupg_homedir): New. * g10/options.h (struct opt): Remove 'homedir' and replace all users by the new accessor functions. * g13/g13-common.h (struct opt): Ditto. * scd/scdaemon.h (struct opt): Ditto. * sm/gpgsm.h (struct opt): Ditto. * dirmngr/dirmngr.h (struct opt): Ditto. * agent/preset-passphrase.c (opt_homedir): Ditto. * agent/protect-tool.c (opt_homedir): Ditto. -- This will make detection of a non-default homedir easier. Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'g10/migrate.c')
-rw-r--r--g10/migrate.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/g10/migrate.c b/g10/migrate.c
index f4881b420..a9da5a032 100644
--- a/g10/migrate.c
+++ b/g10/migrate.c
@@ -49,10 +49,10 @@ migrate_secring (ctrl_t ctrl)
char *flagfile = NULL;
char *agent_version = NULL;
- secring = make_filename (opt.homedir, "secring" EXTSEP_S "gpg", NULL);
+ secring = make_filename (gnupg_homedir (), "secring" EXTSEP_S "gpg", NULL);
if (access (secring, F_OK))
goto leave; /* Does not exist or is not readable. */
- flagfile = make_filename (opt.homedir, V21_MIGRATION_FNAME, NULL);
+ flagfile = make_filename (gnupg_homedir (), V21_MIGRATION_FNAME, NULL);
if (!access (flagfile, F_OK))
goto leave; /* Does exist - fine. */