You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Today when enumerating directories, we look only for entries with DT_DIR (directory) or DT_REG (regular file); if we encounter something unknown or a symlink, we stat to resolve it and determine whether it's actually an S_IFDIR (directory) or S_IFREG (regular file). There are (at least) two problems with this:
1) The stat to a symlink will fail if the symlink points to a non-existent entry.
2) We end up skipping lots of special files, e.g. FIFOs.
The commit changes our logic to simply special case directories: we treat everything as a file unless we're sure it's a directory. This directly fixes (2), and indirectly fixes (1): our logic for DirectoryExists already ignores any stat errors, returning false if the symlink couldn't be resolved, such that this naturally maps to our desired behavior of broken symlinks being categorized as a file.
0 commit comments