Merge pull request #13651 from cdown/find_binary_2

util-lib: Don't propagate EACCES from find_binary PATH lookup to caller
This commit is contained in:
Anita Zhang 2019-09-27 09:39:10 -07:00 committed by GitHub
commit c4fed80522
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -651,7 +651,9 @@ int find_binary(const char *name, char **ret) {
return 0;
}
last_error = -errno;
/* PATH entries which we don't have access to are ignored, as per tradition. */
if (errno != EACCES)
last_error = -errno;
}
return last_error;