diff options
Diffstat (limited to 'chrome/browser/download/save_package.cc')
-rw-r--r-- | chrome/browser/download/save_package.cc | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/chrome/browser/download/save_package.cc b/chrome/browser/download/save_package.cc index 91e0b41..56723c4 100644 --- a/chrome/browser/download/save_package.cc +++ b/chrome/browser/download/save_package.cc @@ -958,19 +958,12 @@ bool SavePackage::GetSaveInfo(const FilePath& suggest_name, // Since we take the suggested name from the web page's title, we want to // ignore the file extension generated by SaveFileAsWithFilter, since it // will always be ".htm". - // TODO(estade): is this saved_main_file_path assignment behavior desired? - // It was copied from previous code but seems strange. std::wstring main_file_path; - if (!win_util::SaveFileAsWithFilter(container_hwnd, - suggest_name.value(), - filter, - L"htm", - true, - &index, - &main_file_path)) { - param->saved_main_file_path = FilePath(main_file_path); + bool success = win_util::SaveFileAsWithFilter(container_hwnd, + suggest_name.value(), filter, L"htm", true, &index, &main_file_path); + param->saved_main_file_path = FilePath(main_file_path); + if (!success) return false; - } } else { param->saved_main_file_path = suggest_name; } |