shell32: SHELL32_GetItemAttributes() [resend]

Martin Fuchs martin-fuchs at gmx.net
Sun Nov 20 04:01:21 CST 2005


Changelog:
correctly call HCR_GetFolderAttributes() in SHELL32_GetItemAttributes()


some additional clarification:

The sense of the change is to join the if clause of the
HCR_GetFolderAttributes() call:

 [...]
else if (_ILGetGUIDPointer() && HCR_GetFolderAttributes())
  [return new attributes]
else
 [search for other return attributes using _ILGetDataPointer()]
else
 [return nothing]


The old code version used the following wrong logic:

 [...]
else if (_ILGetGUIDPointer()) {
  if (!HCR_GetFolderAttributes())
   [return nothing]
} else
 [search for other return attributes using _ILGetDataPointer()]
else
 [return nothing]



Index: shlfolder.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/shlfolder.c,v
retrieving revision 1.106
diff -u -p -d -r1.106 shlfolder.c
--- shlfolder.c	3 Nov 2005 09:56:07 -0000	1.106
+++ shlfolder.c	20 Nov 2005 10:00:49 -0000
@@ -408,14 +408,13 @@ HRESULT SHELL32_GetItemAttributes (IShel
         *pdwAttributes &= dwSupportedAttr;
     }
 
+    dwAttributes = *pdwAttributes;
+
     if (_ILIsDrive (pidl)) {
         *pdwAttributes &= SFGAO_HASSUBFOLDER|SFGAO_FILESYSTEM|SFGAO_FOLDER|SFGAO_FILESYSANCESTOR|
 	    SFGAO_DROPTARGET|SFGAO_HASPROPSHEET|SFGAO_CANLINK;
-    } else if (_ILGetGUIDPointer (pidl)) {
-	if (!HCR_GetFolderAttributes (pidl, pdwAttributes)) {
-	    *pdwAttributes &= SFGAO_HASSUBFOLDER|SFGAO_FOLDER|SFGAO_FILESYSANCESTOR|
-		SFGAO_DROPTARGET|SFGAO_HASPROPSHEET|SFGAO_CANRENAME|SFGAO_CANLINK;
-	}
+    } else if (_ILGetGUIDPointer (pidl) && HCR_GetFolderAttributes(pidl, &dwAttributes)) {
+	*pdwAttributes = dwAttributes;
     } else if (_ILGetDataPointer (pidl)) {
 	dwAttributes = _ILGetFileAttributes (pidl, NULL, 0);
 




More information about the wine-patches mailing list