Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
os: Readdir swallows partial results if it fails to Lstat any file in the listing #27416
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
Just spent 2+ hours debugging a problem around this bug. It should not happen!
In our project we needed to reimplement ReadDir() ourselves to work around this bug
But there was an odd place where ioutils.ReadDir() was used instead of our fixed version.
We should not need to reinvent parts of the standard library - please consider fixing this for good. It is extremely frustrating to spend time chasing bugs in standard libraries - resorting to very careful analysis of strace output to notice that getdents64 returns 82 entries but we only have 52 newfstatat() calls!
This is a high severity bug it should get more attention.