| Index: base/files/file_enumerator_posix.cc
|
| diff --git a/base/files/file_enumerator_posix.cc b/base/files/file_enumerator_posix.cc
|
| index 16a04801c3ae450f5ad6c88a02571f12f5cdabde..fb4010aadcad566f304a899344f1cb892b666081 100644
|
| --- a/base/files/file_enumerator_posix.cc
|
| +++ b/base/files/file_enumerator_posix.cc
|
| @@ -131,11 +131,9 @@
|
| additional space for pathname may be needed
|
| #endif
|
|
|
| - // In all implementations of the C library that Chromium can run with,
|
| - // concurrent calls to readdir that specify different directory streams are
|
| - // thread-safe. This is the case here, since the directory stream is scoped to
|
| - // the current function. See https://codereview.chromium.org/2411833004/#msg3
|
| - for (struct dirent* dent = readdir(dir); dent; dent = readdir(dir)) {
|
| + struct dirent dent_buf;
|
| + struct dirent* dent;
|
| + while (readdir_r(dir, &dent_buf, &dent) == 0 && dent) {
|
| FileInfo info;
|
| info.filename_ = FilePath(dent->d_name);
|
|
|
|
|