diff options
-rw-r--r-- | src/basic/path-util.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/basic/path-util.c b/src/basic/path-util.c index c4e022b3a1..d3b4978239 100644 --- a/src/basic/path-util.c +++ b/src/basic/path-util.c @@ -637,6 +637,9 @@ int find_binary(const char *name, char **ret) { if (!j) return -ENOMEM; + if (is_dir(j, true)) + continue; + if (access(j, X_OK) >= 0) { /* Found it! */ |