Commit 640bf7c6 authored by Alexandre Julliard's avatar Alexandre Julliard

Authors: Michael Jung <mjung@iss.tu-darmstadt.de>, Ge van Geldorp <gvg@reactos.com>

- Prepend Desktop folder path for files/directories stored in the filesystem Desktop folder when GetDisplayNameOf is called with the SHGDN_FORPARSING flags. - Add testcases.
parent 76cc9f22
......@@ -665,8 +665,19 @@ static HRESULT WINAPI ISF_Desktop_fnGetDisplayNameOf (IShellFolder2 * iface,
}
else
{
/* file system folder */
_ILSimpleGetText (pidl, strRet->u.cStr, MAX_PATH);
int cLen = 0;
/* file system folder or file rooted at the desktop */
if ((GET_SHGDN_FOR(dwFlags) == SHGDN_FORPARSING) &&
(GET_SHGDN_RELATION(dwFlags) != SHGDN_INFOLDER))
{
WideCharToMultiByte(CP_ACP, 0, This->sPathTarget, -1, strRet->u.cStr, MAX_PATH,
NULL, NULL);
PathAddBackslashA(strRet->u.cStr);
cLen = lstrlenA(strRet->u.cStr);
}
_ILSimpleGetText (pidl, strRet->u.cStr + cLen, MAX_PATH - cLen);
if (!_ILIsFolder(pidl))
SHELL_FS_ProcessDisplayFilename(strRet->u.cStr, dwFlags);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment