summaryrefslogtreecommitdiffstats
path: root/base/file_util_win.cc
diff options
context:
space:
mode:
authorvandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-11 21:12:29 +0000
committervandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-11 21:12:29 +0000
commit9fa8c2f5e9581c2e521fd28aadedc4c77b9b2150 (patch)
tree9d99023192c738da45988592fa69eaf52a02a7b5 /base/file_util_win.cc
parent4f792a2d49c6a64ecde1f96d739b17c0f4765764 (diff)
downloadchromium_src-9fa8c2f5e9581c2e521fd28aadedc4c77b9b2150.zip
chromium_src-9fa8c2f5e9581c2e521fd28aadedc4c77b9b2150.tar.gz
chromium_src-9fa8c2f5e9581c2e521fd28aadedc4c77b9b2150.tar.bz2
Improve unit tests to verify that directories are listed before files in file:/// urls.
And fix current regression. BUG=28420 TEST=improved unit tests Review URL: http://codereview.chromium.org/492015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34382 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/file_util_win.cc')
-rw-r--r--base/file_util_win.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/base/file_util_win.cc b/base/file_util_win.cc
index 9d29d80..6dfc049 100644
--- a/base/file_util_win.cc
+++ b/base/file_util_win.cc
@@ -727,6 +727,10 @@ void FileEnumerator::GetFindInfo(FindInfo* info) {
memcpy(info, &find_data_, sizeof(*info));
}
+bool FileEnumerator::IsDirectory(const FindInfo& info) {
+ return (info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0;
+}
+
FilePath FileEnumerator::Next() {
if (!is_in_find_op_) {
if (pending_paths_.empty())