diff --git a/dll/win32/shell32/brfolder.cpp b/dll/win32/shell32/brfolder.cpp index d328cf340e8..c23eec56507 100644 --- a/dll/win32/shell32/brfolder.cpp +++ b/dll/win32/shell32/brfolder.cpp @@ -343,6 +343,15 @@ BrFolder_InsertItem( _In_ PCIDLIST_ABSOLUTE pidlParent, _In_ HTREEITEM hParent) { + if (!(BrowseFlagsToSHCONTF(info->lpBrowseInfo->ulFlags) & SHCONTF_NONFOLDERS)) + { +#ifdef BIF_BROWSEFILEJUNCTIONS + if (!(info->lpBrowseInfo->ulFlags & BIF_BROWSEFILEJUNCTIONS)) +#endif + if (SHGetAttributes(lpsf, pidlChild, SFGAO_STREAM) & SFGAO_STREAM) + return NULL; // .zip files have both FOLDER and STREAM attributes set + } + WCHAR szName[MAX_PATH]; if (!BrFolder_GetName(lpsf, pidlChild, SHGDN_NORMAL, szName)) return NULL; diff --git a/dll/win32/shell32/folders/CFSFolder.cpp b/dll/win32/shell32/folders/CFSFolder.cpp index 3c7bb8f2d03..b3437febae5 100644 --- a/dll/win32/shell32/folders/CFSFolder.cpp +++ b/dll/win32/shell32/folders/CFSFolder.cpp @@ -624,6 +624,7 @@ HRESULT SHELL32_GetFSItemAttributes(IShellFolder * psf, LPCITEMIDLIST pidl, LPDW WCHAR szFileName[MAX_PATH]; LPWSTR pExtension; BOOL hasName = _ILSimpleGetTextW(pidl, szFileName, _countof(szFileName)); + dwShellAttributes |= SFGAO_STREAM; // Vista+ feature: Hidden files with a leading tilde treated as super-hidden // See https://devblogs.microsoft.com/oldnewthing/20170526-00/?p=96235 @@ -672,10 +673,6 @@ HRESULT SHELL32_GetFSItemAttributes(IShellFolder * psf, LPCITEMIDLIST pidl, LPDW dwShellAttributes |= (SFGAO_FILESYSANCESTOR | SFGAO_STORAGEANCESTOR); } } - else - { - dwShellAttributes |= SFGAO_STREAM; - } if (dwFileAttributes & FILE_ATTRIBUTE_HIDDEN) dwShellAttributes |= SFGAO_HIDDEN | SFGAO_GHOSTED;