TShellTreeView: better fix not displaying files in connected ShellListView. Issue #0027571.

git-svn-id: trunk@48063 -
This commit is contained in:
bart 2015-03-01 12:13:05 +00:00
parent e4c47b66f4
commit 5dc968befc

View File

@ -859,7 +859,10 @@ begin
ANode := Selected;
if Assigned(FShellListView) and Assigned(ANode) then
begin
IsDirectory := (not (otNonFolders in FObjectTypes)) or ANode.HasChildren;
//You cannot rely on HasChildren here, because it can become FALSE when user
//clicks the expand sign and folder is empty
//Issue 0027571
IsDirectory := DirectoryExistsUtf8(ChompPathDelim(GetPathFromNode(ANode)));
if IsDirectory then
begin
//Note: the folder may have been deleted in the mean time