Skip to content

Commit

Permalink
setFilter in moveOrCopyAction
Browse files Browse the repository at this point in the history
  • Loading branch information
sgyuris committed Dec 3, 2024
1 parent fbfe307 commit feecba7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions apps/files/src/actions/moveOrCopyAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,11 @@ async function openFilePickerForAction(
// We don't want to show the current nodes in the file picker
return !fileIDs.includes(n.fileid)
})
.setFilter((n: Node) => {
// We only want to show folders in the file picker
// We don't want to show encrypted folders in the file picker
return !(n.attributes?.['type'] !== "directory" || n.attributes?.['is-encrypted'] === 1)
})
.setMimeTypeFilter([])
.setMultiSelect(false)
.startAt(dir)
Expand Down

0 comments on commit feecba7

Please sign in to comment.