| Index: base/files/file_enumerator_win.cc
|
| diff --git a/base/files/file_enumerator_win.cc b/base/files/file_enumerator_win.cc
|
| index 64c98455ce505d5f7fd46be4c1188efd0c0b639c..e47f5421a711b7ef1dea22cc0590cceb578216ab 100644
|
| --- a/base/files/file_enumerator_win.cc
|
| +++ b/base/files/file_enumerator_win.cc
|
| @@ -133,8 +133,10 @@ FilePath FileEnumerator::Next() {
|
| if (recursive_) {
|
| // If |cur_file| is a directory, and we are doing recursive searching,
|
| // add it to pending_paths_ so we scan it after we finish scanning this
|
| - // directory.
|
| - pending_paths_.push(cur_file);
|
| + // directory. However, don't do recursion through reparse points or we
|
| + // may end up with an infinite cycle.
|
| + if (!(find_data_.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT))
|
| + pending_paths_.push(cur_file);
|
| }
|
| if (file_type_ & FileEnumerator::DIRECTORIES)
|
| return cur_file;
|
|
|