Chromium Code Reviews| Index: base/file_util_posix.cc |
| diff --git a/base/file_util_posix.cc b/base/file_util_posix.cc |
| index 9a36fb290677a63f2a34d7ccda60693a04c17e2e..a63dc69af9ccb9b1fe83d10e141767856b58321e 100644 |
| --- a/base/file_util_posix.cc |
| +++ b/base/file_util_posix.cc |
| @@ -223,9 +223,11 @@ bool Delete(const FilePath& path, bool recursive) { |
| bool success = true; |
| std::stack<std::string> directories; |
| directories.push(path.value()); |
| - FileEnumerator traversal(path, true, static_cast<FileEnumerator::FileType>( |
| - FileEnumerator::FILES | FileEnumerator::DIRECTORIES | |
| - FileEnumerator::SHOW_SYM_LINKS)); |
| + FileEnumerator traversal( |
| + path, |
|
jar (doing other things)
2012/08/06 18:27:02
nit: IMO, put lines 227 and 228 on line 226.
It i
Haruki Sato
2012/08/06 23:22:18
Done.
Thank you for the thourough review.
|
| + true, |
| + (FileEnumerator::FILES | FileEnumerator::DIRECTORIES | |
| + FileEnumerator::SHOW_SYM_LINKS)); |
| for (FilePath current = traversal.Next(); success && !current.empty(); |
| current = traversal.Next()) { |
| FileEnumerator::FindInfo info; |
| @@ -311,12 +313,9 @@ bool CopyDirectory(const FilePath& from_path, |
| return false; |
| bool success = true; |
| - FileEnumerator::FileType traverse_type = |
| - static_cast<FileEnumerator::FileType>(FileEnumerator::FILES | |
| - FileEnumerator::SHOW_SYM_LINKS); |
| + int traverse_type = FileEnumerator::FILES | FileEnumerator::SHOW_SYM_LINKS; |
| if (recursive) |
| - traverse_type = static_cast<FileEnumerator::FileType>( |
| - traverse_type | FileEnumerator::DIRECTORIES); |
| + traverse_type |= FileEnumerator::DIRECTORIES; |
| FileEnumerator traversal(from_path, recursive, traverse_type); |
| // We have to mimic windows behavior here. |to_path| may not exist yet, |
| @@ -739,7 +738,7 @@ bool SetCurrentDirectory(const FilePath& path) { |
| FileEnumerator::FileEnumerator(const FilePath& root_path, |
| bool recursive, |
| - FileType file_type) |
| + int file_type) |
| : current_directory_entry_(0), |
| root_path_(root_path), |
| recursive_(recursive), |
| @@ -751,7 +750,7 @@ FileEnumerator::FileEnumerator(const FilePath& root_path, |
| FileEnumerator::FileEnumerator(const FilePath& root_path, |
| bool recursive, |
| - FileType file_type, |
| + int file_type, |
| const FilePath::StringType& pattern) |
| : current_directory_entry_(0), |
| root_path_(root_path), |