More robustly query the SHGDN_FORPARSING flag in the shell32's folders
GetDisplayNameOf methods.
diff --git a/dlls/shell32/shfldr_desktop.c b/dlls/shell32/shfldr_desktop.c
index ffea8f9..82a3836 100644
--- a/dlls/shell32/shfldr_desktop.c
+++ b/dlls/shell32/shfldr_desktop.c
@@ -559,7 +559,7 @@
if (_ILIsDesktop (pidl))
{
if ((GET_SHGDN_RELATION (dwFlags) == SHGDN_NORMAL) &&
- (GET_SHGDN_FOR (dwFlags) == SHGDN_FORPARSING))
+ (GET_SHGDN_FOR (dwFlags) & SHGDN_FORPARSING))
{
BOOL defCharUsed;
@@ -589,7 +589,7 @@
if ((clsid = _ILGetGUIDPointer (pidl)))
{
- if (GET_SHGDN_FOR (dwFlags) == SHGDN_FORPARSING)
+ if (GET_SHGDN_FOR (dwFlags) & SHGDN_FORPARSING)
{
int bWantsForParsing;
diff --git a/dlls/shell32/shfldr_fs.c b/dlls/shell32/shfldr_fs.c
index 1403fa8..5060c47 100644
--- a/dlls/shell32/shfldr_fs.c
+++ b/dlls/shell32/shfldr_fs.c
@@ -764,7 +764,7 @@
strRet->uType = STRRET_CSTR;
if (_ILIsDesktop(pidl)) { /* empty pidl */
- if ((GET_SHGDN_FOR(dwFlags) == SHGDN_FORPARSING) &&
+ if ((GET_SHGDN_FOR(dwFlags) & SHGDN_FORPARSING) &&
(GET_SHGDN_RELATION(dwFlags) != SHGDN_INFOLDER))
{
if (This->sPathTarget)
@@ -774,7 +774,7 @@
hr = E_INVALIDARG;
}
} else if (_ILIsPidlSimple(pidl)) {
- if ((GET_SHGDN_FOR(dwFlags) == SHGDN_FORPARSING) &&
+ if ((GET_SHGDN_FOR(dwFlags) & SHGDN_FORPARSING) &&
(GET_SHGDN_RELATION(dwFlags) != SHGDN_INFOLDER) &&
This->sPathTarget)
{
diff --git a/dlls/shell32/shfldr_mycomp.c b/dlls/shell32/shfldr_mycomp.c
index 70e8463..98b5d62 100644
--- a/dlls/shell32/shfldr_mycomp.c
+++ b/dlls/shell32/shfldr_mycomp.c
@@ -567,7 +567,7 @@
clsid = _ILGetGUIDPointer (pidl);
if (clsid)
{
- if (GET_SHGDN_FOR (dwFlags) == SHGDN_FORPARSING)
+ if (GET_SHGDN_FOR (dwFlags) & SHGDN_FORPARSING)
{
static const WCHAR clsidW[] =
{ 'C','L','S','I','D','\\',0 };
diff --git a/dlls/shell32/shfldr_unixfs.c b/dlls/shell32/shfldr_unixfs.c
index 8e64c5f..eeedf8f 100644
--- a/dlls/shell32/shfldr_unixfs.c
+++ b/dlls/shell32/shfldr_unixfs.c
@@ -793,7 +793,7 @@
TRACE("(iface=%p, pidl=%p, uFlags=%lx, lpName=%p)\n", iface, pidl, uFlags, lpName);
- if ((GET_SHGDN_FOR(uFlags) == SHGDN_FORPARSING) &&
+ if ((GET_SHGDN_FOR(uFlags) & SHGDN_FORPARSING) &&
(GET_SHGDN_RELATION(uFlags) != SHGDN_INFOLDER))
{
if (!pidl->mkid.cb) {