-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
calls rewinddir before calling readdirat
Summary: https://pubs.opengroup.org/onlinepubs/007904875/functions/rewinddir.html > The rewinddir() function shall reset the position of the directory stream to which dirp refers to the beginning of the directory. It shall also cause the directory stream to refer to the current state of the corresponding directory, as a call to opendir() would have done. For some FS (like btrfs on newer kernels), new entries added after calling `opendir` and `rewinddir` are not available from readdir. Therefore, we should call `rewinddir` right before calling `readdir`. Reviewed By: dschatzberg Differential Revision: D58393743 fbshipit-source-id: 4a195b288ff7b304d43241075ce9128e38080e27
- Loading branch information
1 parent
78b8a47
commit b1018d8
Showing
2 changed files
with
48 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters