Skip to content

Commit fea6eed

Browse files
authored
Disable the context menu command inside a zipped folder (#15236)
Closes #15190
1 parent adbe4a0 commit fea6eed

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/cascadia/ShellExtension/OpenTerminalHere.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ HRESULT OpenTerminalHere::GetState(IShellItemArray* psiItemArray,
119119

120120
SFGAOF attributes;
121121
const bool isFileSystemItem = psi && (psi->GetAttributes(SFGAO_FILESYSTEM, &attributes) == S_OK);
122-
*pCmdState = isFileSystemItem ? ECS_ENABLED : ECS_HIDDEN;
122+
const bool isCompressed = psi && (psi->GetAttributes(SFGAO_FOLDER | SFGAO_STREAM, &attributes) == S_OK);
123+
*pCmdState = isFileSystemItem && !isCompressed ? ECS_ENABLED : ECS_HIDDEN;
123124

124125
return S_OK;
125126
}

0 commit comments

Comments
 (0)