aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-03-09 23:23:20 +0100
committerGitHub <noreply@github.com>2019-03-09 23:23:20 +0100
commit092e7e6c60588463389182a3babde9f4ee98bc1c (patch)
treed2dfc65f5508b89bb2170e24b42697c6ac4b9375 /src
parent3cb89cafe3e99fc64f6fd6fff47831d1a9331b4e (diff)
parent7757ce1cb82b690f056814fb0008eeee9f57684d (diff)
downloadrneovim-092e7e6c60588463389182a3babde9f4ee98bc1c.tar.gz
rneovim-092e7e6c60588463389182a3babde9f4ee98bc1c.tar.bz2
rneovim-092e7e6c60588463389182a3babde9f4ee98bc1c.zip
Merge #9703 from erw7/fix-executable-on-unix
Diffstat (limited to 'src')
-rw-r--r--src/nvim/os/fs.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/nvim/os/fs.c b/src/nvim/os/fs.c
index 7f2ebeec2f..27db675c52 100644
--- a/src/nvim/os/fs.c
+++ b/src/nvim/os/fs.c
@@ -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
}