Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1116)

Unified Diff: chrome/browser/file_select_helper.cc

Issue 6250118: For directory upload, show empty directories (all directories, in fact) by in... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,14 @@
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) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698