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