diff options
Diffstat (limited to 'compat')
-rw-r--r-- | compat/mingw.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compat/mingw.c b/compat/mingw.c index c0bc849e45..772cad510d 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -536,7 +536,8 @@ static char *lookup_prog(const char *dir, const char *cmd, int isexe, int exe_on return xstrdup(path); path[strlen(path)-4] = '\0'; if ((!exe_only || isexe) && access(path, F_OK) == 0) - return xstrdup(path); + if (!(GetFileAttributes(path) & FILE_ATTRIBUTE_DIRECTORY)) + return xstrdup(path); return NULL; } |