diff options
author | johnnyg@chromium.org <johnnyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-04 22:09:11 +0000 |
---|---|---|
committer | johnnyg@chromium.org <johnnyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-04 22:09:11 +0000 |
commit | 9897e0960081e2e5fb87e6c57188c92278ffa757 (patch) | |
tree | af55e9e94210b8eddc1dbd11cd42e837159802d7 /chrome/browser/file_select_helper.cc | |
parent | 5c7dd4efd3f9983d5f8f9d0f8840420e279d6f43 (diff) | |
download | chromium_src-9897e0960081e2e5fb87e6c57188c92278ffa757.zip chromium_src-9897e0960081e2e5fb87e6c57188c92278ffa757.tar.gz chromium_src-9897e0960081e2e5fb87e6c57188c92278ffa757.tar.bz2 |
For directory upload, show empty directories (all directories, in fact) by including the corresponding "." file in the result set.
BUG=71713
TEST=see bug
Review URL: http://codereview.chromium.org/6250118
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73851 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/file_select_helper.cc')
-rw-r--r-- | chrome/browser/file_select_helper.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/chrome/browser/file_select_helper.cc b/chrome/browser/file_select_helper.cc index 9cab2ba..8b7f7d5 100644 --- a/chrome/browser/file_select_helper.cc +++ b/chrome/browser/file_select_helper.cc @@ -96,12 +96,14 @@ void FileSelectHelper::DirectorySelected(const FilePath& path) { 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(FILE_PATH_LITERAL("."))); + else + directory_lister_results_.push_back(data.path); } void FileSelectHelper::OnListDone(int error) { |