Hi Martin,
On Tuesday 01 November 2005 02:40, Martin Fuchs wrote:
Changelog: correctly call HCR_GetFolderAttributes() in SHELL32_GetItemAttributes()
Index: shlfolder.c
RCS file: /home/wine/wine/dlls/shell32/shlfolder.c,v retrieving revision 1.104 diff -u -p -d -r1.104 shlfolder.c --- shlfolder.c 20 Jul 2005 10:29:05 -0000 1.104 +++ shlfolder.c 1 Nov 2005 01:22:38 -0000 @@ -411,14 +411,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;
- }
Those are default flags, for the case that HCR_GetFolderAttributes didn't find a registry entry. Are you sure those aren't necessary? Perhaps we should push them into HCR_GetFolderAttributes, though.
- } else if(_ILGetGUIDPointer(pidl) && HCR_GetFolderAttributes(pidl,
&dwAttributes)){
- *pdwAttributes = dwAttributes; } else if (_ILGetDataPointer (pidl)) { dwAttributes = _ILGetFileAttributes (pidl, NULL, 0);
Bye,
Hello Michael,
Those are default flags, for the case that HCR_GetFolderAttributes didn't find a registry entry. Are you sure those aren't necessary? Perhaps we should push them into HCR_GetFolderAttributes, though.
Yes, I am quite sure the change is correct. It doesn't just remove the following code:
- if (!HCR_GetFolderAttributes (pidl, pdwAttributes)) { - *pdwAttributes &= SFGAO_HASSUBFOLDER|SFGAO_FOLDER|SFGAO_FILESYSANCESTOR| - SFGAO_DROPTARGET|SFGAO_HASPROPSHEET|SFGAO_CANRENAME|SFGAO_CANLINK;
If you look into shlfolder.c you will see the same code is still available in the final 'else' clause at line 459:
} else { *pdwAttributes &= SFGAO_HASSUBFOLDER|SFGAO_FOLDER|SFGAO_FILESYSANCESTOR|SFGAO_DROPTARGET|SFGAO_HASPROPSHEET|SFGAO_CANRENAME|SFGAO_CANLINK; }
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]
Regards,
Martin
On Tuesday 01 November 2005 10:31, you wrote:
If you look into shlfolder.c you will see the same code is still available in the final 'else' clause at line 459:
} else {
*pdwAttributes &= SFGAO_HASSUBFOLDER|SFGAO_FOLDER|SFGAO_FILESYSANCESTOR|SFGAO_DROPTARGET|SFGA O_HASPROPSHEET|SFGAO_CANRENAME|SFGAO_CANLINK; }
Ah, I see. Sorry for the noise.
Bye,