Mikhail Denisenko <denisenkom@gmail.com>

- Split the PIDL into current and parent folder, and call GetFolderAttributes only for current folder PIDL. This fixes tons of "ERR: HCR_GetFolderAttributes should be called for simple PIDL's only!" debug log spam messages.

See issue #4494 for more details.

svn path=/trunk/; revision=41279
This commit is contained in:
Aleksey Bragin 2009-06-04 09:01:10 +00:00
parent 30269c48c7
commit 9e9c082bb7

View file

@ -172,7 +172,11 @@ bool ShellDirectory::get_path(PTSTR path, size_t path_count) const
SFGAOF attribs = SFGAO_FILESYSTEM;
if (FAILED(const_cast<ShellFolder&>(_folder)->GetAttributesOf(1, (LPCITEMIDLIST*)&_pidl, &attribs)))
// Split pidl into current and parent folder PIDLs
ShellPath pidlParent, pidlFolder;
_pidl.split(pidlParent, pidlFolder);
if (FAILED(const_cast<ShellFolder&>(_folder)->GetAttributesOf(1, (LPCITEMIDLIST*)&pidlFolder, &attribs)))
return false;
if (!(attribs & SFGAO_FILESYSTEM))