Chromium Code Reviews| Index: chrome/browser/file_select_helper.cc |
| =================================================================== |
| --- chrome/browser/file_select_helper.cc (revision 73181) |
| +++ chrome/browser/file_select_helper.cc (working copy) |
| @@ -96,12 +96,13 @@ |
| void FileSelectHelper::OnListFile( |
| const net::DirectoryLister::DirectoryListerData& data) { |
| - // Directory upload only cares about files. This util call just checks |
| + // Directory upload returns directories via a "." file, so that |
| + // empty directories are included. This util call just checks |
| // the flags in the structure; there's no file I/O going on. |
| if (file_util::FileEnumerator::IsDirectory(data.info)) |
| - return; |
| - |
| - directory_lister_results_.push_back(data.path); |
| + directory_lister_results_.push_back(data.path.Append(".")); |
|
jianli
2011/02/03 18:20:36
Have you checked if this worked for all 3 platform
|
| + else |
| + directory_lister_results_.push_back(data.path); |
| } |
| void FileSelectHelper::OnListDone(int error) { |