From a7dbab23ea4976d106d649aa515ffb2968a085ed Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Mon, 24 Aug 2015 19:59:43 +0200 Subject: [PATCH] w32: Look for gpgconf in the new GnuPG 2.1 install dir. * src/w32-util.c (_gpgme_get_gpgconf_path): Try another location of gpgconf.exe. Signed-off-by: Werner Koch --- src/w32-util.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/w32-util.c b/src/w32-util.c index fa6dcddc..9aba26f5 100644 --- a/src/w32-util.c +++ b/src/w32-util.c @@ -522,7 +522,16 @@ _gpgme_get_gpgconf_path (void) gpgconf = find_program_in_dir (inst_dir, name); } - /* 2. Try to find gpgconf.exe using that ancient registry key. */ + /* 2. Try to find gpgconf.exe from GnuPG >= 2.1 below CSIDL_PROGRAM_FILES. */ + if (!gpgconf) + { + const char *name2 = (default_gpgconf_name ? default_gpgconf_name + /**/ : "GnuPG\\bin\\gpgconf.exe"); + gpgconf = find_program_at_standard_place (name2); + } + + /* 3. Try to find gpgconf.exe using that ancient registry key. This + should eventually be removed. */ if (!gpgconf) { char *dir; @@ -537,15 +546,13 @@ _gpgme_get_gpgconf_path (void) } } - /* 3. Try to find gpgconf.exe below CSIDL_PROGRAM_FILES. */ + /* 4. Try to find gpgconf.exe from Gpg4win below CSIDL_PROGRAM_FILES. */ if (!gpgconf) { - name = (default_gpgconf_name ? default_gpgconf_name - /**/ : "GNU\\GnuPG\\gpgconf.exe"); - gpgconf = find_program_at_standard_place (name); + gpgconf = find_program_at_standard_place ("GNU\\GnuPG\\gpgconf.exe"); } - /* 4. Print a debug message if not found. */ + /* 5. Print a debug message if not found. */ if (!gpgconf) _gpgme_debug (DEBUG_ENGINE, "_gpgme_get_gpgconf_path: '%s' not found",name);