diff --git a/src/main/java/org/apposed/appose/FilePaths.java b/src/main/java/org/apposed/appose/FilePaths.java index 7e31e08..e347119 100644 --- a/src/main/java/org/apposed/appose/FilePaths.java +++ b/src/main/java/org/apposed/appose/FilePaths.java @@ -72,7 +72,7 @@ public static File findExe(List dirs, List exes) { // Candidate is a relative path; check beneath each given directory. for (String dir : dirs) { File f = Paths.get(dir, exe).toFile(); - if (f.canExecute()) return f; + if (f.canExecute() && !f.isDirectory()) return f; } } }