diff options
Diffstat (limited to 'src/w32-util.c')
-rw-r--r-- | src/w32-util.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/w32-util.c b/src/w32-util.c index 21de6dc..ad36c9a 100644 --- a/src/w32-util.c +++ b/src/w32-util.c @@ -16,7 +16,7 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this program; if not, see <http://www.gnu.org/licenses/>. + * License along with this program; if not, see <https://www.gnu.org/licenses/>. **/ #ifdef HAVE_CONFIG_H @@ -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)) |