Skip to content

Commit

Permalink
Add the OFN_NOCHANGEDIR flag when opening the multiple file dialog
Browse files Browse the repository at this point in the history
on Windows, to avoid changing the directory.  This allows directories
to be renamed or deleted after showing the dialog.

We already do this for other Windows file dialogs.  It looks
like the lack of the flag in this dialog was a bug when it
was initially added in https://codereview.chromium.org/14907.

BUG=238094
R=sky@chromium.org

Review URL: https://codereview.chromium.org/89473002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238174 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
mmenke@chromium.org committed Dec 2, 2013
1 parent 2adef90 commit 288c830
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ui/shell_dialogs/select_file_dialog_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@ bool SelectFileDialogImpl::RunOpenMultiFileDialog(
// We use OFN_NOCHANGEDIR so that the user can rename or delete the directory
// without having to close Chrome first.
ofn.Flags = OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST | OFN_EXPLORER
| OFN_HIDEREADONLY | OFN_ALLOWMULTISELECT;
| OFN_HIDEREADONLY | OFN_ALLOWMULTISELECT | OFN_NOCHANGEDIR;

if (!filter.empty()) {
ofn.lpstrFilter = filter.c_str();
Expand Down

0 comments on commit 288c830

Please sign in to comment.