]> asedeno.scripts.mit.edu Git - git.git/blobdiff - compat/mingw.c
Merge git://repo.or.cz/git-gui
[git.git] / compat / mingw.c
index c0bc849e45dc511202d1e7602f570de47630e6aa..772cad510d5d260fdf33b4f7d6ff79f9f3367b05 100644 (file)
@@ -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;
 }