Merge #9703 from erw7/fix-executable-on-unix

This commit is contained in:
Justin M. Keyes 2019-03-09 23:23:20 +01:00 committed by GitHub
commit 092e7e6c60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -288,7 +288,11 @@ static bool is_executable(const char *name)
// a directory.
return (S_ISREG(mode));
#else
return (S_ISREG(mode) && (S_IXUSR & mode));
int r = -1;
if (S_ISREG(mode)) {
RUN_UV_FS_FUNC(r, uv_fs_access, name, X_OK, NULL);
}
return (r == 0);
#endif
}