mirror of
https://github.com/reactos/reactos.git
synced 2024-09-28 05:26:58 +00:00
[NETSHELL] CNetworkConnections: Remove SFGAO_CANRENAME bit when renaming shouldn't be enabled.
This fixes the problem where renaming could take place by clicking on a name even when it is disabled in the context menu. CORE-14116
This commit is contained in:
parent
91119080bc
commit
41639e94c2
|
@ -401,10 +401,33 @@ HRESULT WINAPI CNetworkConnections::GetAttributesOf(
|
|||
*rgfInOut = ~0;
|
||||
|
||||
if (cidl == 0)
|
||||
{
|
||||
*rgfInOut = dwNetConnectAttributes;
|
||||
}
|
||||
else
|
||||
{
|
||||
*rgfInOut = dwNetConnectItemAttributes;
|
||||
|
||||
while (cidl > 0 && *apidl)
|
||||
{
|
||||
const VALUEStruct * val;
|
||||
NETCON_PROPERTIES * pProperties;
|
||||
|
||||
val = _ILGetValueStruct(*apidl);
|
||||
if (!val)
|
||||
continue;
|
||||
|
||||
if (val->pItem->GetProperties(&pProperties) != S_OK)
|
||||
continue;
|
||||
|
||||
if (!(pProperties->dwCharacter & NCCF_ALLOW_RENAME))
|
||||
*rgfInOut &= ~SFGAO_CANRENAME;
|
||||
|
||||
apidl++;
|
||||
cidl--;
|
||||
}
|
||||
}
|
||||
|
||||
/* make sure SFGAO_VALIDATE is cleared, some apps depend on that */
|
||||
*rgfInOut &= ~SFGAO_VALIDATE;
|
||||
|
||||
|
|
Loading…
Reference in a new issue