[PATCH 1/7] shell32: Fix copying of files when using a context menu.
Huw Davies
huw at codeweavers.com
Fri May 25 03:50:49 CDT 2018
On Fri, May 25, 2018 at 04:49:50AM +0000, Alistair Leslie-Hughes wrote:
> From: Michael Müller <michael at fds-team.de>
>
> Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
> ---
> dlls/shell32/shlview_cmenu.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/dlls/shell32/shlview_cmenu.c b/dlls/shell32/shlview_cmenu.c
> index fc761e1..905dde9 100644
> --- a/dlls/shell32/shlview_cmenu.c
> +++ b/dlls/shell32/shlview_cmenu.c
> @@ -1124,6 +1124,13 @@ static BOOL DoPaste(ContextMenu *This)
>
> apidl = _ILCopyCidaToaPidl(&pidl, lpcida);
>
> + /*
> + * Incase source is a file, we need to remove the last component
> + * to obtain a IShellFolder of the parent.
> + */
> + if (_ILIsValue(pidl))
> + ILRemoveLastID(pidl);
> +
> /* bind to the source shellfolder */
> SHGetDesktopFolder(&psfDesktop);
> if(psfDesktop)
This looks like a hack hiding some other bug. If the root item is
really allowed to be a file, we should investigate whether that file
is also copied.
Huw.
More information about the wine-devel
mailing list