summaryrefslogtreecommitdiffstats
path: root/chrome/common/zip.cc
diff options
context:
space:
mode:
authoryuzo@chromium.org <yuzo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-09 05:57:38 +0000
committeryuzo@chromium.org <yuzo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-09 05:57:38 +0000
commit8199b3ae54cd41ff1012a4cae3640028043b0bb4 (patch)
tree5718d8e8cdc3889a7c82271f0beb8094b0914531 /chrome/common/zip.cc
parent9c0b3e3a30ab2246a9385b978e86003d4fc8ceb9 (diff)
downloadchromium_src-8199b3ae54cd41ff1012a4cae3640028043b0bb4.zip
chromium_src-8199b3ae54cd41ff1012a4cae3640028043b0bb4.tar.gz
chromium_src-8199b3ae54cd41ff1012a4cae3640028043b0bb4.tar.bz2
Include a parent directory link in the file list for file:///somepath
Also, order files/directories lexicographically. TEST=on linux, type file:///usr/ in the address bar and make sure the contents are sorted and include an entry for '..', which is [parent directory]. On windows, type file:///C:/Users/ . BUG=12621, 12812 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17933 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/zip.cc')
-rw-r--r--chrome/common/zip.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/chrome/common/zip.cc b/chrome/common/zip.cc
index 9b34dcb..9ac6da3 100644
--- a/chrome/common/zip.cc
+++ b/chrome/common/zip.cc
@@ -281,7 +281,9 @@ bool Zip(const FilePath& src_dir, const FilePath& dest_file) {
bool success = true;
file_util::FileEnumerator file_enumerator(
src_dir, true, // recursive
- file_util::FileEnumerator::FILES_AND_DIRECTORIES);
+ static_cast<file_util::FileEnumerator::FILE_TYPE>(
+ file_util::FileEnumerator::FILES |
+ file_util::FileEnumerator::DIRECTORIES));
for (FilePath path = file_enumerator.Next(); !path.value().empty();
path = file_enumerator.Next()) {
if (!AddEntryToZip(zip_file, path, src_dir)) {