Chromium Code Reviews

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

Issue 79045: Fixes saving files that don't have valid extensions. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « no previous file | chrome/browser/download/save_package.cc » ('j') | chrome/browser/download/save_package.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_manager.cc
===================================================================
--- chrome/browser/download/download_manager.cc (revision 13948)
+++ chrome/browser/download/download_manager.cc (working copy)
@@ -641,6 +641,8 @@
SelectFileDialog::FileTypeInfo file_type_info;
file_type_info.extensions.resize(1);
file_type_info.extensions[0].push_back(info->suggested_path.Extension());
+ if (!file_type_info.extensions[0][0].empty())
+ file_type_info.extensions[0][0].erase(0, 1); // drop the .
scherkus (not reviewing) 2009/04/17 19:45:07 wait.. would it make sense to DCHECK this? ".txt"
file_type_info.include_all_files = true;
gfx::NativeWindow owning_window =
contents ? platform_util::GetTopLevel(contents->GetNativeView()) : NULL;
« no previous file with comments | « no previous file | chrome/browser/download/save_package.cc » ('j') | chrome/browser/download/save_package.cc » ('J')

Powered by Google App Engine