diff options
author | avi@google.com <avi@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-07 17:47:52 +0000 |
---|---|---|
committer | avi@google.com <avi@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-07 17:47:52 +0000 |
commit | e5b5a4882827576a19cd50134103540614c2204e (patch) | |
tree | a95575506679c82a1e17ab5bd467f7788c05fd8c /chrome/browser/views/shell_dialogs_win.cc | |
parent | 7963ee9d944d111988f5417a6993c49a9b277cdd (diff) | |
download | chromium_src-e5b5a4882827576a19cd50134103540614c2204e.zip chromium_src-e5b5a4882827576a19cd50134103540614c2204e.tar.gz chromium_src-e5b5a4882827576a19cd50134103540614c2204e.tar.bz2 |
Fix "Save page as..." functionality. Fix by Roland Steiner.
http://codereview.chromium.org/63045
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13260 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/shell_dialogs_win.cc')
-rw-r--r-- | chrome/browser/views/shell_dialogs_win.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/chrome/browser/views/shell_dialogs_win.cc b/chrome/browser/views/shell_dialogs_win.cc index b4df9ed..0c3abcf 100644 --- a/chrome/browser/views/shell_dialogs_win.cc +++ b/chrome/browser/views/shell_dialogs_win.cc @@ -324,9 +324,13 @@ void SelectFileDialogImpl::ExecuteSelectFile( params.run_state.owner, &path); } else if (params.type == SELECT_SAVEAS_FILE) { + std::wstring path_as_wstring = path.ToWStringHack(); success = win_util::SaveFileAsWithFilter(params.run_state.owner, params.default_path.ToWStringHack(), params.filter, - params.default_extension, false, &filter_index, &path.ToWStringHack()); + params.default_extension, false, &filter_index, &path_as_wstring); + if(success) { + path = FilePath::FromWStringHack(path_as_wstring); + } DisableOwner(params.run_state.owner); } else if (params.type == SELECT_OPEN_FILE) { success = RunOpenFileDialog(params.title, params.filter, |