Rebase against 80ea5a01ef42b0e9e0b6c872f8f5bbbf393c0ae7.

This commit is contained in:
Sebastian Lackner
2016-01-30 00:01:11 +01:00
parent 89a3c598c3
commit ad65139e3d
3 changed files with 64 additions and 65 deletions

View File

@@ -1,18 +1,18 @@
From d9a2ea5065ced402ffe4551d7d863450310c1978 Mon Sep 17 00:00:00 2001
From e86e14d9db9067fa0312470ac1c8363171e57837 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:09:22 +0200
Subject: shell32: Set SFGAO_HASSUBFOLDER correctly for unixfs.
---
dlls/shell32/shfldr_unixfs.c | 26 ++++++++++++++++++++++----
1 file changed, 22 insertions(+), 4 deletions(-)
dlls/shell32/shfldr_unixfs.c | 25 +++++++++++++++++++++----
1 file changed, 21 insertions(+), 4 deletions(-)
diff --git a/dlls/shell32/shfldr_unixfs.c b/dlls/shell32/shfldr_unixfs.c
index b3b0214..dbc71f2 100644
index be1ba81..481ee06 100644
--- a/dlls/shell32/shfldr_unixfs.c
+++ b/dlls/shell32/shfldr_unixfs.c
@@ -1143,8 +1143,10 @@ static HRESULT WINAPI ShellFolder2_GetAttributesOf(IShellFolder2* iface, UINT ci
SFGAO_HASPROPSHEET|SFGAO_DROPTARGET|SFGAO_FILESYSTEM;
SFGAO_HASPROPSHEET | SFGAO_DROPTARGET | SFGAO_FILESYSTEM;
lstrcpyA(szAbsolutePath, This->m_pszPath);
pszRelativePath = szAbsolutePath + lstrlenA(szAbsolutePath);
- for (i=0; i<cidl; i++) {
@@ -24,33 +24,32 @@ index b3b0214..dbc71f2 100644
WCHAR *dos_name;
if (!UNIXFS_filename_from_shitemid(apidl[i], pszRelativePath))
return E_INVALIDARG;
@@ -1153,8 +1155,24 @@ static HRESULT WINAPI ShellFolder2_GetAttributesOf(IShellFolder2* iface, UINT ci
else
@@ -1154,8 +1156,23 @@ static HRESULT WINAPI ShellFolder2_GetAttributesOf(IShellFolder2* iface, UINT ci
HeapFree( GetProcessHeap(), 0, dos_name );
}
- if (_ILIsFolder(apidl[i]))
- *rgfInOut |= SFGAO_FOLDER|SFGAO_HASSUBFOLDER|SFGAO_FILESYSANCESTOR;
+ if (_ILIsFolder(apidl[i]))
if (_ILIsFolder(apidl[i]))
- *attrs |= SFGAO_FOLDER | SFGAO_HASSUBFOLDER | SFGAO_FILESYSANCESTOR |
- SFGAO_STORAGEANCESTOR | SFGAO_STORAGE;
+ {
+ IEnumIDList *enum_list;
+ IShellFolder2 *child;
+
+ *rgfInOut |= SFGAO_FOLDER|SFGAO_FILESYSANCESTOR;
+ *attrs |= SFGAO_FOLDER | SFGAO_FILESYSANCESTOR | SFGAO_STORAGEANCESTOR | SFGAO_STORAGE;
+
+ if (SUCCEEDED(IShellFolder2_BindToObject(iface, apidl[i], NULL, &IID_IShellFolder2, (void **)&child)))
+ {
+ if (IShellFolder2_EnumObjects(child, NULL, SHCONTF_FOLDERS|SHCONTF_INCLUDEHIDDEN, &enum_list) == S_OK)
+ {
+ if (IEnumIDList_Skip(enum_list, 1) == S_OK)
+ *rgfInOut |= SFGAO_HASSUBFOLDER;
+ *attrs |= SFGAO_HASSUBFOLDER;
+ IEnumIDList_Release(enum_list);
+ }
+ IShellFolder2_Release(child);
+ }
+ }
else
*attrs |= SFGAO_STREAM;
}
}
--
2.5.0
2.7.0