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.
This commit is contained in:
Alexandre Julliard 2005-08-15 09:41:58 +00:00
parent 76cc9f2207
commit 640bf7c6e8
1 changed files with 13 additions and 2 deletions

View File

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