Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: catch undocumented edge case in scandir()
While libuv/vim.loop docs say that `fs_scandir_next()` either returns `nil` or `string, string` or fails, there is an edge case on networked filesystems. In those cases, `uv__fs_scandir()` returns the type `UV_DIRENT_UNKNOWN` and `luv.fs_scandir_next()` [converts][1] this into returning a single string. This means in those cases, `name` is a string and `type` is `nil`. See [this bug report][2]. The situation can be remedied by explicitly calling `fs_stat()` on those files. This always fetches the correct type, as far as I can see. [1]: https://github.com/luvit/luv/blob/master/src/fs.c#L116 [2]: luvit/luv#660
- Loading branch information