Disable the context menu command inside a zipped folder (#15236)

Closes #15190
This commit is contained in:
James Pack
2023-04-25 17:36:20 -04:00
committed by GitHub
parent adbe4a0d0c
commit fea6eeddfd

View File

@@ -119,7 +119,8 @@ HRESULT OpenTerminalHere::GetState(IShellItemArray* psiItemArray,
SFGAOF attributes;
const bool isFileSystemItem = psi && (psi->GetAttributes(SFGAO_FILESYSTEM, &attributes) == S_OK);
*pCmdState = isFileSystemItem ? ECS_ENABLED : ECS_HIDDEN;
const bool isCompressed = psi && (psi->GetAttributes(SFGAO_FOLDER | SFGAO_STREAM, &attributes) == S_OK);
*pCmdState = isFileSystemItem && !isCompressed ? ECS_ENABLED : ECS_HIDDEN;
return S_OK;
}