From 4a52a2ec13cb50880c36dbb6d17dcb945ea174cb Mon Sep 17 00:00:00 2001 From: Giannis Adamopoulos Date: Tue, 1 Sep 2015 10:18:40 +0000 Subject: [PATCH] [SHELL32] - Fix a hack that broke copying files after recent fixes. svn path=/trunk/; revision=68892 --- .../dll/win32/shell32/folders/CFSFolder.cpp | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/reactos/dll/win32/shell32/folders/CFSFolder.cpp b/reactos/dll/win32/shell32/folders/CFSFolder.cpp index 72587c832c7..aaf7206e1a5 100644 --- a/reactos/dll/win32/shell32/folders/CFSFolder.cpp +++ b/reactos/dll/win32/shell32/folders/CFSFolder.cpp @@ -1034,7 +1034,6 @@ HRESULT WINAPI CFSFolder::CopyItems(IShellFolder * pSFFrom, UINT cidl, LPWSTR pszSrc, pszTarget, pszSrcList, pszTargetList, pszFileName; int res, length; HRESULT hr; - STRRET strRet; TRACE ("(%p)->(%p,%u,%p)\n", this, pSFFrom, cidl, apidl); @@ -1047,21 +1046,12 @@ HRESULT WINAPI CFSFolder::CopyItems(IShellFolder * pSFFrom, UINT cidl, return hr; } - hr = pSFFrom->GetDisplayNameOf(pidl, SHGDN_FORPARSING, &strRet); - if (FAILED(hr)) - { - SHFree(pidl); - return hr; - } - - hr = StrRetToBufW(&strRet, pidl, szSrcPath, MAX_PATH); - if (FAILED(hr)) - { - SHFree(pidl); - return hr; - } + hr = SHGetPathFromIDListW(pidl, szSrcPath); SHFree(pidl); + if (FAILED(hr)) + return hr; + pszSrc = PathAddBackslashW(szSrcPath); wcscpy(szTargetPath, sPathTarget);