aboutsummaryrefslogtreecommitdiffstats
path: root/g10/g10.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/g10.c')
-rw-r--r--g10/g10.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/g10/g10.c b/g10/g10.c
index 7da518e25..e004015bd 100644
--- a/g10/g10.c
+++ b/g10/g10.c
@@ -979,8 +979,21 @@ main( int argc, char **argv )
/* Okay, we are now working under our real uid */
if( default_config )
- configname = make_filename(opt.homedir, "options", NULL );
-
+ {
+ configname = make_filename(opt.homedir, "gpg.conf", NULL );
+ if (!access (configname, R_OK))
+ { /* Print a warning when both config files are present. */
+ char *p = make_filename(opt.homedir, "options", NULL );
+ if (!access (p, R_OK))
+ log_info (_("NOTE: old default options file `%s' ignored\n"), p);
+ m_free (p);
+ }
+ else
+ { /* Keep on using the old default one. */
+ m_free (configname);
+ configname = make_filename(opt.homedir, "options", NULL );
+ }
+ }
argc = orig_argc;
argv = orig_argv;
pargs.argc = &argc;