From: Michael Müller michael@fds-team.de
Signed-off-by: Alistair Leslie-Hughes leslie_alistair@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)
On Fri, May 25, 2018 at 04:49:50AM +0000, Alistair Leslie-Hughes wrote:
From: Michael Müller michael@fds-team.de
Signed-off-by: Alistair Leslie-Hughes leslie_alistair@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.