The function returns false with not-simple pidls anyways. This fixes an "ERR" message when opening a control panel applet from explorer
Signed-off-by: Fabian Maurer dark.shadow4@web.de --- dlls/shell32/shlfolder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/shell32/shlfolder.c b/dlls/shell32/shlfolder.c index 10aafc160c0..8e3b561cfd1 100644 --- a/dlls/shell32/shlfolder.c +++ b/dlls/shell32/shlfolder.c @@ -412,7 +412,7 @@ HRESULT SHELL32_GetItemAttributes (IShellFolder2 *psf, LPCITEMIDLIST pidl, LPDWO if (_ILIsDrive (pidl)) { *pdwAttributes &= SFGAO_HASSUBFOLDER|SFGAO_FILESYSTEM|SFGAO_FOLDER|SFGAO_FILESYSANCESTOR| SFGAO_DROPTARGET|SFGAO_HASPROPSHEET|SFGAO_CANLINK; - } else if (has_guid && HCR_GetFolderAttributes(pidl, &dwAttributes)) { + } else if (has_guid && _ILIsPidlSimple(pidl) && HCR_GetFolderAttributes(pidl, &dwAttributes)) { *pdwAttributes = dwAttributes; } else if (_ILGetDataPointer (pidl)) { DWORD file_attr = _ILGetFileAttributes (pidl, NULL, 0); -- 2.34.1
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52394 Signed-off-by: Fabian Maurer dark.shadow4@web.de --- dlls/shell32/shlfolder.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/shell32/shlfolder.c b/dlls/shell32/shlfolder.c index 8e3b561cfd1..28d067075ca 100644 --- a/dlls/shell32/shlfolder.c +++ b/dlls/shell32/shlfolder.c @@ -381,6 +381,7 @@ HRESULT SHELL32_GetItemAttributes (IShellFolder2 *psf, LPCITEMIDLIST pidl, LPDWO { DWORD dwAttributes; BOOL has_guid; + PIDLDATA* data; static const DWORD dwSupportedAttr= SFGAO_CANCOPY | /*0x00000001 */ SFGAO_CANMOVE | /*0x00000002 */ @@ -406,6 +407,7 @@ HRESULT SHELL32_GetItemAttributes (IShellFolder2 *psf, LPCITEMIDLIST pidl, LPDWO }
has_guid = _ILGetGUIDPointer(pidl) != NULL; + data = _ILGetDataPointer (pidl);
dwAttributes = *pdwAttributes;
@@ -414,10 +416,10 @@ HRESULT SHELL32_GetItemAttributes (IShellFolder2 *psf, LPCITEMIDLIST pidl, LPDWO SFGAO_DROPTARGET|SFGAO_HASPROPSHEET|SFGAO_CANLINK; } else if (has_guid && _ILIsPidlSimple(pidl) && HCR_GetFolderAttributes(pidl, &dwAttributes)) { *pdwAttributes = dwAttributes; - } else if (_ILGetDataPointer (pidl)) { + } else if (data) { DWORD file_attr = _ILGetFileAttributes (pidl, NULL, 0);
- if (!file_attr) { + if (!file_attr && data->type != PT_CPLAPPLET) { WCHAR path[MAX_PATH]; STRRET strret;
-- 2.34.1
I have to ask again, what's the state of this? Did I miss something?
Regards, Fabian Maurer
On Sonntag, 16. Januar 2022 19:11:16 CEST you wrote:
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52394 Signed-off-by: Fabian Maurer dark.shadow4@web.de
dlls/shell32/shlfolder.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/shell32/shlfolder.c b/dlls/shell32/shlfolder.c index 8e3b561cfd1..28d067075ca 100644 --- a/dlls/shell32/shlfolder.c +++ b/dlls/shell32/shlfolder.c @@ -381,6 +381,7 @@ HRESULT SHELL32_GetItemAttributes (IShellFolder2 *psf, LPCITEMIDLIST pidl, LPDWO { DWORD dwAttributes; BOOL has_guid;
- PIDLDATA* data; static const DWORD dwSupportedAttr= SFGAO_CANCOPY | /*0x00000001 */ SFGAO_CANMOVE | /*0x00000002 */
@@ -406,6 +407,7 @@ HRESULT SHELL32_GetItemAttributes (IShellFolder2 *psf, LPCITEMIDLIST pidl, LPDWO }
has_guid = _ILGetGUIDPointer(pidl) != NULL;
data = _ILGetDataPointer (pidl);
dwAttributes = *pdwAttributes;
@@ -414,10 +416,10 @@ HRESULT SHELL32_GetItemAttributes (IShellFolder2 *psf, LPCITEMIDLIST pidl, LPDWO SFGAO_DROPTARGET|SFGAO_HASPROPSHEET|SFGAO_CANLINK; } else if (has_guid && _ILIsPidlSimple(pidl) && HCR_GetFolderAttributes(pidl, &dwAttributes)) { *pdwAttributes = dwAttributes;
- } else if (_ILGetDataPointer (pidl)) {
- } else if (data) { DWORD file_attr = _ILGetFileAttributes (pidl, NULL, 0);
if (!file_attr) {
if (!file_attr && data->type != PT_CPLAPPLET) { WCHAR path[MAX_PATH]; STRRET strret;
-- 2.34.1
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=105290
Your paranoid android.
=== debian11 (32 bit Chinese:China report) ===
shell32: shelllink.c:815: Test failed: failed to delete link 'C:\users\winetest\Temp\test.lnk' (32)
The test failures for my two patches don't seem related at all.
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=105290
Your paranoid android.
=== debian11 (32 bit Chinese:China report) ===
shell32: shelllink.c:815: Test failed: failed to delete link 'C:\users\winetest\Temp\test.lnk' (32)
Hello,
Any news on this patch series?
Regards, Fabian Maurer
The function returns false with not-simple pidls anyways. This fixes an "ERR" message when opening a control panel applet from explorer
Signed-off-by: Fabian Maurer dark.shadow4@web.de
dlls/shell32/shlfolder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/shell32/shlfolder.c b/dlls/shell32/shlfolder.c index 10aafc160c0..8e3b561cfd1 100644 --- a/dlls/shell32/shlfolder.c +++ b/dlls/shell32/shlfolder.c @@ -412,7 +412,7 @@ HRESULT SHELL32_GetItemAttributes (IShellFolder2 *psf, LPCITEMIDLIST pidl, LPDWO if (_ILIsDrive (pidl)) { *pdwAttributes &= SFGAO_HASSUBFOLDER|SFGAO_FILESYSTEM|SFGAO_FOLDER|SFGAO_FILESYSANCESTOR| SFGAO_DROPTARGET|SFGAO_HASPROPSHEET|SFGAO_CANLINK;
- } else if (has_guid && HCR_GetFolderAttributes(pidl, &dwAttributes)) {
- } else if (has_guid && _ILIsPidlSimple(pidl) &&
HCR_GetFolderAttributes(pidl, &dwAttributes)) { *pdwAttributes = dwAttributes; } else if (_ILGetDataPointer (pidl)) { DWORD file_attr = _ILGetFileAttributes (pidl, NULL, 0); -- 2.34.1