aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2015-08-24 17:59:43 +0000
committerWerner Koch <[email protected]>2015-08-24 17:59:43 +0000
commita7dbab23ea4976d106d649aa515ffb2968a085ed (patch)
tree5642e14689166e146c02e1139fe6f720cd0798dd /src
parentw32: Expect gpgme-w32spawn.exe only in the gpgme installation dir. (diff)
downloadgpgme-a7dbab23ea4976d106d649aa515ffb2968a085ed.tar.gz
gpgme-a7dbab23ea4976d106d649aa515ffb2968a085ed.zip
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 <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/w32-util.c19
1 files 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);