diff options
author | Werner Koch <wk@gnupg.org> | 2016-06-07 10:59:46 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2016-06-07 10:59:46 +0200 |
commit | 22a7ef01aa2c0eb77bcc40174d09104acc35cab1 (patch) | |
tree | 3782b20549fcc48d2598128676227d9a16f785b6 /g10/tdbio.c | |
parent | po: Update Japanese translation. (diff) | |
download | gnupg2-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/tdbio.c')
-rw-r--r-- | g10/tdbio.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/g10/tdbio.c b/g10/tdbio.c index 5fdd94619..a4147090c 100644 --- a/g10/tdbio.c +++ b/g10/tdbio.c @@ -617,14 +617,15 @@ tdbio_set_dbname (const char *new_dbname, int create, int *r_nofile) if (!new_dbname) { - fname = make_filename (opt.homedir, "trustdb" EXTSEP_S GPGEXT_GPG, NULL); + fname = make_filename (gnupg_homedir (), + "trustdb" EXTSEP_S GPGEXT_GPG, NULL); } else if (*new_dbname != DIRSEP_C ) { if (strchr (new_dbname, DIRSEP_C)) fname = make_filename (new_dbname, NULL); else - fname = make_filename (opt.homedir, new_dbname, NULL); + fname = make_filename (gnupg_homedir (), new_dbname, NULL); } else { |