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

Unified Diff: chrome/browser/download/download_manager.cc

Issue 3018011: POSIX: treat multiple extensions like .tar.gz as a single extension. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: more review comments Created 10 years, 5 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 | « base/file_path_unittest.cc ('k') | net/base/filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_manager.cc
diff --git a/chrome/browser/download/download_manager.cc b/chrome/browser/download/download_manager.cc
index ea740edef2e593388f6be492938b9f8ca3c9e11b..81a2b464b0644394a65e0c229eb596082f22d199 100644
--- a/chrome/browser/download/download_manager.cc
+++ b/chrome/browser/download/download_manager.cc
@@ -1150,7 +1150,7 @@ void DownloadManager::GenerateExtension(
// an executable is hidden in a benign file extension;
// E.g. my-cat.jpg becomes my-cat.jpg.js if content type is
// application/x-javascript.
- // 4. New extension is not ".tar" for .gz files. For misconfigured web
+ // 4. New extension is not ".tar" for .tar.gz files. For misconfigured web
// servers, i.e. bug 5772.
// 5. The original extension is not ".tgz" & the new extension is not "gz".
FilePath::StringType append_extension;
@@ -1161,7 +1161,7 @@ void DownloadManager::GenerateExtension(
!(append_extension == FILE_PATH_LITERAL("gz") &&
extension == FILE_PATH_LITERAL("tgz")) &&
(append_extension != FILE_PATH_LITERAL("tar") ||
- extension != FILE_PATH_LITERAL("gz"))) {
+ extension != FILE_PATH_LITERAL("tar.gz"))) {
extension += FILE_PATH_LITERAL(".");
extension += append_extension;
}
« no previous file with comments | « base/file_path_unittest.cc ('k') | net/base/filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698