w32: Fallback to 2.1 reg key for gpgconf search
* src/w32-util.c (_gpgme_get_gpgconf_path): Fallback to 2.1 installer registry key. -- Finding gpgconf is utterly important so we should be as compatible as possible.
This commit is contained in:
parent
329ab93f7e
commit
72b83ffc4d
@ -563,15 +563,26 @@ _gpgme_get_gpgconf_path (void)
|
|||||||
gpgconf = find_program_at_standard_place (name2);
|
gpgconf = find_program_at_standard_place (name2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 3. Try to find gpgconf.exe using that ancient registry key. This
|
/* 3. Try to find gpgconf.exe using the Windows registry. */
|
||||||
should eventually be removed. */
|
|
||||||
if (!gpgconf)
|
if (!gpgconf)
|
||||||
{
|
{
|
||||||
char *dir;
|
char *dir;
|
||||||
|
|
||||||
dir = read_w32_registry_string ("HKEY_LOCAL_MACHINE",
|
dir = read_w32_registry_string (NULL,
|
||||||
"Software\\GNU\\GnuPG",
|
"Software\\GNU\\GnuPG",
|
||||||
"Install Directory");
|
"Install Directory");
|
||||||
|
if (!dir)
|
||||||
|
{
|
||||||
|
char *tmp = read_w32_registry_string (NULL,
|
||||||
|
"Software\\GnuPG",
|
||||||
|
"Install Directory");
|
||||||
|
if (tmp)
|
||||||
|
{
|
||||||
|
if (gpgrt_asprintf (&dir, "%s\\bin", tmp) == -1)
|
||||||
|
return NULL;
|
||||||
|
free (tmp);
|
||||||
|
}
|
||||||
|
}
|
||||||
if (dir)
|
if (dir)
|
||||||
{
|
{
|
||||||
gpgconf = find_program_in_dir (dir, name);
|
gpgconf = find_program_in_dir (dir, name);
|
||||||
|
Loading…
Reference in New Issue
Block a user