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
  • Loading branch information
jamespack committed Apr 25, 2023
1 parent adbe4a0 commit fea6eed
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 @@ -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;
}
Expand Down

0 comments on commit fea6eed

Please sign in to comment.