diff options
author | tim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-16 02:42:45 +0000 |
---|---|---|
committer | tim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-16 02:42:45 +0000 |
commit | 3bc9ffaf7c2a6ece95287c9a0ca0b895438a2444 (patch) | |
tree | f8314dfd653095024bf421de6eb5ae85fb10f24b /base/file_util_win.cc | |
parent | 6e6fd1f47325dc85d9ae65cdbd9194d3e23bf9f4 (diff) | |
download | chromium_src-3bc9ffaf7c2a6ece95287c9a0ca0b895438a2444.zip chromium_src-3bc9ffaf7c2a6ece95287c9a0ca0b895438a2444.tar.gz chromium_src-3bc9ffaf7c2a6ece95287c9a0ca0b895438a2444.tar.bz2 |
Fix FileEnumerator (win) for non-recursive, directory-only enumerations.
It previously only actually returned directories for recursive traversals.
Review URL: http://codereview.chromium.org/7157
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3450 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/file_util_win.cc')
-rw-r--r-- | base/file_util_win.cc | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/base/file_util_win.cc b/base/file_util_win.cc index 7be172f..9c34ab3 100644 --- a/base/file_util_win.cc +++ b/base/file_util_win.cc @@ -683,11 +683,8 @@ std::wstring FileEnumerator::Next() { // it to pending_paths_ so we scan it after we finish scanning this // directory. pending_paths_.push(cur_file); - return (file_type_ & FileEnumerator::DIRECTORIES) ? cur_file : Next(); } - - if ((file_type_ & FileEnumerator::DIRECTORIES) == 0) - return Next(); + return (file_type_ & FileEnumerator::DIRECTORIES) ? cur_file : Next(); } return (file_type_ & FileEnumerator::FILES) ? cur_file : Next(); } |