Skip to content

Commit

Permalink
fix: disable zip on trashbin
Browse files Browse the repository at this point in the history
Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
  • Loading branch information
skjnldsv authored Sep 3, 2024
1 parent 2c2554e commit 2fe7b88
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ const fileAction = new FileAction({
displayName() {
return t('files_zip', 'Compress to Zip')
},
enabled(nodes: Node[]) {
enabled(nodes: Node[], view: View) {
if (view.id === 'trashbin') {
return false
}
return nodes.filter((node) => (node.permissions & Permission.READ) !== 0).length > 0
},
async execBatch(nodes: Node[], view: View, dir: string) {
Expand Down

0 comments on commit 2fe7b88

Please sign in to comment.