Index: dlls/shell32/shfldr_fs.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/shfldr_fs.c,v
retrieving revision 1.40
diff -u -r1.40 shfldr_fs.c
--- dlls/shell32/shfldr_fs.c	23 May 2005 16:31:42 -0000	1.40
+++ dlls/shell32/shfldr_fs.c	25 May 2005 14:05:54 -0000
@@ -480,7 +480,7 @@
 
     TRACE ("(%p)->(pidl=%p,%p,%s,%p)\n", This, pidl, pbc,
      shdebugstr_guid (riid), ppvOut);
-
+    
     return SHELL32_BindToChild (This->pidlRoot, This->sPathTarget, pidl, riid,
      ppvOut);
 }
@@ -575,7 +575,7 @@
     _ICOM_THIS_From_IShellFolder2 (IGenericSFImpl, iface)
 
     HRESULT hr = S_OK;
-
+    
     TRACE ("(%p)->(cidl=%d apidl=%p mask=%p (0x%08lx))\n", This, cidl, apidl,
      rgfInOut, rgfInOut ? *rgfInOut : 0);
 
@@ -587,6 +587,9 @@
     if (*rgfInOut == 0)
         *rgfInOut = ~0;
 
+    if(apidl == 0)
+        *rgfInOut &= This->dwAttributes;
+    else
     while (cidl > 0 && *apidl) {
         pdump (*apidl);
         SHELL32_GetItemAttributes (_IShellFolder_ (This), *apidl, rgfInOut);
@@ -1305,7 +1308,8 @@
 IFSFldr_PersistFolder3_Initialize (IPersistFolder3 * iface, LPCITEMIDLIST pidl)
 {
     char sTemp[MAX_PATH];
-
+    DWORD dwAttributes = 0xffffffff;
+    
     _ICOM_THIS_From_IPersistFolder3 (IGenericSFImpl, iface);
 
     TRACE ("(%p)->(%p)\n", This, pidl);
@@ -1316,6 +1320,12 @@
 
     if (This->sPathTarget)
         SHFree (This->sPathTarget);
+    
+    if (This->dwAttributes)
+    {
+        SHELL32_GetItemAttributes (_IShellFolder_ (This),  This->pidlRoot, &dwAttributes);
+        This->dwAttributes = dwAttributes;
+    }
 
     /* set my path */
     if (SHGetPathFromIDListA (pidl, sTemp)) {
@@ -1354,6 +1364,7 @@
                                      const PERSIST_FOLDER_TARGET_INFO * ppfti)
 {
     char sTemp[MAX_PATH];
+    DWORD dwAttributes = 0xffffffff;
 
     _ICOM_THIS_From_IPersistFolder3 (IGenericSFImpl, iface);
 
@@ -1372,6 +1383,9 @@
         __SHFreeAndNil (&This->pidlRoot);    /* free the old */
     if (This->sPathTarget)
         __SHFreeAndNil (&This->sPathTarget);
+    
+    SHELL32_GetItemAttributes (_IShellFolder_ (This), This->pidlRoot, &dwAttributes);
+    This->dwAttributes = dwAttributes;
 
     /*
      * Root path and pidl
