Commit 5a622342 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

comdlg32: When FOS_PICKFOLDERS is specified item selection box should contain full path name.

Otherwise when selecting a folder using IFileOpenDialog interface the caller instead of C:\Temp receives C:\Temp\Temp. This matches both an old GetOpenFileName behaviour and what IFileOpenDialog returns under Windows. Signed-off-by: 's avatarDmitry Timoshkov <dmitry@baikal.ru> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent d4029a1a
......@@ -639,7 +639,7 @@ void COMDLG32_GetCanonicalPath(PCIDLIST_ABSOLUTE pidlAbsCurrent,
}
PathAddBackslashW(lpstrPathAndFile);
TRACE("current directory=%s\n", debugstr_w(lpstrPathAndFile));
TRACE("current directory=%s, file=%s\n", debugstr_w(lpstrPathAndFile), debugstr_w(lpstrFile));
/* if the user specified a fully qualified path use it */
if(PathIsRelativeW(lpstrFile))
......
......@@ -424,7 +424,7 @@ static void fill_filename_from_selection(FileDialogImpl *This)
(!(This->options & FOS_PICKFOLDERS) && (attr & SFGAO_FOLDER))))
continue;
hr = IShellItem_GetDisplayName(psi, SIGDN_PARENTRELATIVEPARSING, &names[valid_count]);
hr = IShellItem_GetDisplayName(psi, (This->options & FOS_PICKFOLDERS) ? SIGDN_FILESYSPATH : SIGDN_PARENTRELATIVEPARSING, &names[valid_count]);
if(SUCCEEDED(hr))
{
len_total += lstrlenW(names[valid_count]) + 3;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment