aboutsummaryrefslogtreecommitdiffstats
path: root/g10/g10maint.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--g10/g10maint.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/g10/g10maint.c b/g10/g10maint.c
index ed0f90e56..b35106c0d 100644
--- a/g10/g10maint.c
+++ b/g10/g10maint.c
@@ -258,7 +258,14 @@ main( int argc, char **argv )
opt.def_digest_algo = DIGEST_ALGO_RMD160;
opt.completes_needed = 1;
opt.marginals_needed = 3;
- opt.homedir = "~/.gnupg";
+ opt.homedir = getenv("GNUPGHOME");
+ if( !opt.homedir || !*opt.homedir ) {
+ #ifdef __MINGW32__
+ opt.homedir = "c:/gnupg";
+ #else
+ opt.homedir = "~/.gnupg";
+ #endif
+ }
/* check wether we have a config file on the commandline */
orig_argc = argc;