Windows: Fix selection of multiple files with long combined paths (issue #423).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@384 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt 2011-11-17 19:39:10 +00:00
parent 40edde7f3f
commit 7a6abdbbf2
1 changed files with 4 additions and 3 deletions

View File

@ -613,10 +613,11 @@ bool RunOpenMultiFileDialog(const std::wstring& filter, HWND owner,
ofn.lStructSize = sizeof(ofn);
ofn.hwndOwner = owner;
wchar_t filename[MAX_PATH] = L"";
scoped_array<wchar_t> filename(new wchar_t[UNICODE_STRING_MAX_CHARS]);
filename[0] = 0;
ofn.lpstrFile = filename;
ofn.nMaxFile = MAX_PATH;
ofn.lpstrFile = filename.get();
ofn.nMaxFile = UNICODE_STRING_MAX_CHARS;
// We use OFN_NOCHANGEDIR so that the user can rename or delete the directory
// without having to close Chrome first.