Commit 8016f6cc authored by Michael Jung's avatar Michael Jung Committed by Alexandre Julliard

More robustly query the SHGDN_FORPARSING flag in the shell32's folders

GetDisplayNameOf methods.
parent 4f14044f
...@@ -559,7 +559,7 @@ static HRESULT WINAPI ISF_Desktop_fnGetDisplayNameOf (IShellFolder2 * iface, ...@@ -559,7 +559,7 @@ static HRESULT WINAPI ISF_Desktop_fnGetDisplayNameOf (IShellFolder2 * iface,
if (_ILIsDesktop (pidl)) if (_ILIsDesktop (pidl))
{ {
if ((GET_SHGDN_RELATION (dwFlags) == SHGDN_NORMAL) && if ((GET_SHGDN_RELATION (dwFlags) == SHGDN_NORMAL) &&
(GET_SHGDN_FOR (dwFlags) == SHGDN_FORPARSING)) (GET_SHGDN_FOR (dwFlags) & SHGDN_FORPARSING))
{ {
BOOL defCharUsed; BOOL defCharUsed;
...@@ -589,7 +589,7 @@ static HRESULT WINAPI ISF_Desktop_fnGetDisplayNameOf (IShellFolder2 * iface, ...@@ -589,7 +589,7 @@ static HRESULT WINAPI ISF_Desktop_fnGetDisplayNameOf (IShellFolder2 * iface,
if ((clsid = _ILGetGUIDPointer (pidl))) if ((clsid = _ILGetGUIDPointer (pidl)))
{ {
if (GET_SHGDN_FOR (dwFlags) == SHGDN_FORPARSING) if (GET_SHGDN_FOR (dwFlags) & SHGDN_FORPARSING)
{ {
int bWantsForParsing; int bWantsForParsing;
......
...@@ -764,7 +764,7 @@ IShellFolder_fnGetDisplayNameOf (IShellFolder2 * iface, LPCITEMIDLIST pidl, ...@@ -764,7 +764,7 @@ IShellFolder_fnGetDisplayNameOf (IShellFolder2 * iface, LPCITEMIDLIST pidl,
strRet->uType = STRRET_CSTR; strRet->uType = STRRET_CSTR;
if (_ILIsDesktop(pidl)) { /* empty pidl */ 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)) (GET_SHGDN_RELATION(dwFlags) != SHGDN_INFOLDER))
{ {
if (This->sPathTarget) if (This->sPathTarget)
...@@ -774,7 +774,7 @@ IShellFolder_fnGetDisplayNameOf (IShellFolder2 * iface, LPCITEMIDLIST pidl, ...@@ -774,7 +774,7 @@ IShellFolder_fnGetDisplayNameOf (IShellFolder2 * iface, LPCITEMIDLIST pidl,
hr = E_INVALIDARG; hr = E_INVALIDARG;
} }
} else if (_ILIsPidlSimple(pidl)) { } else if (_ILIsPidlSimple(pidl)) {
if ((GET_SHGDN_FOR(dwFlags) == SHGDN_FORPARSING) && if ((GET_SHGDN_FOR(dwFlags) & SHGDN_FORPARSING) &&
(GET_SHGDN_RELATION(dwFlags) != SHGDN_INFOLDER) && (GET_SHGDN_RELATION(dwFlags) != SHGDN_INFOLDER) &&
This->sPathTarget) This->sPathTarget)
{ {
......
...@@ -567,7 +567,7 @@ static HRESULT WINAPI ISF_MyComputer_fnGetDisplayNameOf (IShellFolder2 *iface, ...@@ -567,7 +567,7 @@ static HRESULT WINAPI ISF_MyComputer_fnGetDisplayNameOf (IShellFolder2 *iface,
clsid = _ILGetGUIDPointer (pidl); clsid = _ILGetGUIDPointer (pidl);
if (clsid) if (clsid)
{ {
if (GET_SHGDN_FOR (dwFlags) == SHGDN_FORPARSING) if (GET_SHGDN_FOR (dwFlags) & SHGDN_FORPARSING)
{ {
static const WCHAR clsidW[] = static const WCHAR clsidW[] =
{ 'C','L','S','I','D','\\',0 }; { 'C','L','S','I','D','\\',0 };
......
...@@ -793,7 +793,7 @@ static HRESULT WINAPI UnixFolder_IShellFolder2_GetDisplayNameOf(IShellFolder2* i ...@@ -793,7 +793,7 @@ static HRESULT WINAPI UnixFolder_IShellFolder2_GetDisplayNameOf(IShellFolder2* i
TRACE("(iface=%p, pidl=%p, uFlags=%lx, lpName=%p)\n", iface, pidl, uFlags, lpName); 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)) (GET_SHGDN_RELATION(uFlags) != SHGDN_INFOLDER))
{ {
if (!pidl->mkid.cb) { if (!pidl->mkid.cb) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment