[PATCH 1/7] shell32: Fix copying of files when using a context menu.

Alistair Leslie-Hughes leslie_alistair at hotmail.com
Thu May 24 23:49:50 CDT 2018


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)
-- 
1.9.1



More information about the wine-devel mailing list