Fallback to CSIDL_PROGRAM_FILESX86 doesn't work
Closed, ResolvedPublic

Description

When looking for gpgconf.exe, the fallback introduced in commit 72b83ff does not
work.

I have looked at find_program_at_standard_place() in w32-util.c, and
the code logic seems incorrect. The "path" buffer is always set to
contain path of the 64-bit Program Files, since the first call to
SHGetSpecialFolderPathA() will always succeed. The second call is never
used.

The correct way would be to make the first call, try access() on the
path constructed in "result", and if it fails, try the same thing with
CSIDL_PROGRAM_FILESX86.

Attached patch fixes the issue. With it, I am able to use GpgME in a
64-bit app.

werner added a subscriber: werner.Nov 4 2016, 8:16 AM

Fixed with commit df08a0c. Thanks.

werner closed this task as Resolved.Jan 23 2017, 11:23 PM
werner claimed this task.
werner removed a project: Testing.