diff options
-rw-r--r-- | src/nvim/os/fs.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/nvim/os/fs.c b/src/nvim/os/fs.c index 785c79127f..3789da3b17 100644 --- a/src/nvim/os/fs.c +++ b/src/nvim/os/fs.c @@ -120,9 +120,13 @@ static bool is_executable(const char_u *name) return false; } - if (S_ISREG(mode) && (S_IXUSR & mode)) { - return true; - } +#if WIN32 + // Windows does not have exec bit; just check if the file exists and is not + // a directory. + return (S_ISREG(mode)); +#else + return (S_ISREG(mode) && (S_IXUSR & mode)); +#endif return false; } |