diff options
Diffstat (limited to 'src/nvim/os/fs.c')
-rw-r--r-- | src/nvim/os/fs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/os/fs.c b/src/nvim/os/fs.c index 3789da3b17..522e49950c 100644 --- a/src/nvim/os/fs.c +++ b/src/nvim/os/fs.c @@ -421,10 +421,10 @@ bool os_scandir(Directory *dir, const char *path) FUNC_ATTR_NONNULL_ALL { int r = uv_fs_scandir(&fs_loop, &dir->request, path, 0, NULL); - if (r <= 0) { + if (r < 0) { os_closedir(dir); } - return r > 0; + return r >= 0; } /// Increments the directory pointer. |