From 9e9c082bb7295760d18411ef3bfeab8bcafae260 Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Thu, 4 Jun 2009 09:01:10 +0000 Subject: [PATCH] Mikhail Denisenko - 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 --- reactos/base/shell/explorer/shell/shellfs.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/reactos/base/shell/explorer/shell/shellfs.cpp b/reactos/base/shell/explorer/shell/shellfs.cpp index bc0ac028957..2f80077b4b6 100644 --- a/reactos/base/shell/explorer/shell/shellfs.cpp +++ b/reactos/base/shell/explorer/shell/shellfs.cpp @@ -172,7 +172,11 @@ bool ShellDirectory::get_path(PTSTR path, size_t path_count) const SFGAOF attribs = SFGAO_FILESYSTEM; - if (FAILED(const_cast(_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(_folder)->GetAttributesOf(1, (LPCITEMIDLIST*)&pidlFolder, &attribs))) return false; if (!(attribs & SFGAO_FILESYSTEM))