Rebase against b5e17b669a90d961a93f6092ebc3736ff8ca9cd6.

This commit is contained in:
Zebediah Figura
2021-09-14 21:44:56 -05:00
parent 5f19a81589
commit ad56d6b3d3
8 changed files with 24 additions and 370 deletions

View File

@@ -1,28 +1,27 @@
From 9048f6a6a21813d12a00e2b031e3aa916fb7b3f4 Mon Sep 17 00:00:00 2001
From 4b890399fb10c9ed8cf4d17db4373a170b3f0b66 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sat, 15 Aug 2015 21:12:00 +0200
Subject: shell32: Set SFGAO_HASSUBFOLDER correctly for normal shellfolders.
Subject: [PATCH] shell32: Set SFGAO_HASSUBFOLDER correctly for normal
shellfolders.
---
dlls/shell32/shlfolder.c | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
dlls/shell32/shlfolder.c | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/dlls/shell32/shlfolder.c b/dlls/shell32/shlfolder.c
index 8688c5d..53fd323 100644
index f288b7f7ab1..18499190fee 100644
--- a/dlls/shell32/shlfolder.c
+++ b/dlls/shell32/shlfolder.c
@@ -449,8 +449,24 @@ HRESULT SHELL32_GetItemAttributes (IShellFolder2 *psf, LPCITEMIDLIST pidl, LPDWO
*pdwAttributes |= SFGAO_FILESYSTEM | SFGAO_DROPTARGET | SFGAO_HASPROPSHEET | SFGAO_CANDELETE |
@@ -450,7 +450,23 @@ HRESULT SHELL32_GetItemAttributes (IShellFolder2 *psf, LPCITEMIDLIST pidl, LPDWO
SFGAO_CANRENAME | SFGAO_CANLINK | SFGAO_CANMOVE | SFGAO_CANCOPY;
- if (dwAttributes & FILE_ATTRIBUTE_DIRECTORY)
- *pdwAttributes |= (SFGAO_FOLDER | SFGAO_HASSUBFOLDER | SFGAO_FILESYSANCESTOR);
+ if (dwAttributes & FILE_ATTRIBUTE_DIRECTORY)
if (file_attr & FILE_ATTRIBUTE_DIRECTORY)
- *pdwAttributes |= (SFGAO_FOLDER | SFGAO_HASSUBFOLDER | SFGAO_FILESYSANCESTOR | SFGAO_STORAGEANCESTOR | SFGAO_STORAGE);
+ {
+ IEnumIDList *enum_list;
+ IShellFolder *child;
+
+ *pdwAttributes |= (SFGAO_FOLDER | SFGAO_FILESYSANCESTOR);
+ *pdwAttributes |= (SFGAO_FOLDER | SFGAO_FILESYSANCESTOR | SFGAO_STORAGEANCESTOR | SFGAO_STORAGE);
+
+ if (SUCCEEDED(IShellFolder2_BindToObject(psf, pidl, NULL, &IID_IShellFolder, (void **)&child)))
+ {
@@ -36,8 +35,8 @@ index 8688c5d..53fd323 100644
+ }
+ }
else
*pdwAttributes &= ~(SFGAO_FOLDER | SFGAO_HASSUBFOLDER | SFGAO_FILESYSANCESTOR);
{
*pdwAttributes &= ~(SFGAO_FOLDER | SFGAO_HASSUBFOLDER | SFGAO_FILESYSANCESTOR | SFGAO_STORAGEANCESTOR | SFGAO_STORAGE);
--
2.9.0
2.33.0