From 5ca7991ded516e685cb8b5be8c90f0f5aaaaea54 Mon Sep 17 00:00:00 2001 From: James Pack Date: Tue, 25 Apr 2023 17:36:20 -0400 Subject: [PATCH] Disable the context menu command inside a zipped folder (#15236) Closes #15190 (cherry picked from commit fea6eeddfd25f9c951483437344f3be031a49939) Service-Card-Id: 89001983 Service-Version: 1.17 --- src/cascadia/ShellExtension/OpenTerminalHere.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cascadia/ShellExtension/OpenTerminalHere.cpp b/src/cascadia/ShellExtension/OpenTerminalHere.cpp index 4aee550e5c8..b26981a2e16 100644 --- a/src/cascadia/ShellExtension/OpenTerminalHere.cpp +++ b/src/cascadia/ShellExtension/OpenTerminalHere.cpp @@ -105,7 +105,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; }