Skip to content

Commit

Permalink
Disable the context menu command inside a zipped folder (#15236)
Browse files Browse the repository at this point in the history
Closes #15190

(cherry picked from commit fea6eed)
Service-Card-Id: 89001983
Service-Version: 1.17
  • Loading branch information
jamespack authored and DHowett committed Apr 25, 2023
1 parent 31dc6d8 commit 5ca7991
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cascadia/ShellExtension/OpenTerminalHere.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 5ca7991

Please sign in to comment.