w32: Fix locating gpgconf on 64 bit systems.
* src/w32-util.c (find_program_at_standard_place): Use access to check
whether the binary is at CSIDL_PROGRAM_FILES before testing
CSIDL_PROGRAM_FILESX86.
--
Suggested-by: ticho
Fixes-commit: a82e9b182f
GnuPG-bug-id: 2814
Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
aad94cb7c3
commit
df08a0ca3f
@ -415,8 +415,17 @@ find_program_at_standard_place (const char *name)
|
||||
We First try the generic place and then fallback to the x86
|
||||
(i.e. 32 bit) place. This will prefer a 64 bit of the program
|
||||
over a 32 bit version on 64 bit Windows if installed. */
|
||||
if (SHGetSpecialFolderPathA (NULL, path, CSIDL_PROGRAM_FILES, 0)
|
||||
|| SHGetSpecialFolderPathA (NULL, path, CSIDL_PROGRAM_FILESX86, 0))
|
||||
if (SHGetSpecialFolderPathA (NULL, path, CSIDL_PROGRAM_FILES, 0))
|
||||
{
|
||||
result = _gpgme_strconcat (path, "\\", name, NULL);
|
||||
if (result && access (result, F_OK))
|
||||
{
|
||||
free (result);
|
||||
result = NULL;
|
||||
}
|
||||
}
|
||||
if (!result
|
||||
&& SHGetSpecialFolderPathA (NULL, path, CSIDL_PROGRAM_FILESX86, 0))
|
||||
{
|
||||
result = _gpgme_strconcat (path, "\\", name, NULL);
|
||||
if (result && access (result, F_OK))
|
||||
|
Loading…
Reference in New Issue
Block a user