Skip to content

Commit e7ff126

Browse files
committed
Merge #290 [Fix30] setFilter in moveOrCopyAction
2 parents 3d31c5c + 264f3b8 commit e7ff126

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

apps/files/src/actions/moveOrCopyAction.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,11 @@ async function openFilePickerForAction(
222222
// We don't want to show the current nodes in the file picker
223223
return !fileIDs.includes(n.fileid)
224224
})
225+
.setFilter((n: Node) => {
226+
// We only want to show folders in the file picker
227+
// We don't want to show encrypted folders in the file picker
228+
return !(n.attributes?.['type'] !== "directory" || n.attributes?.['is-encrypted'] === 1)
229+
})
225230
.setCanPick((n) => {
226231
const hasCreatePermissions = (n.permissions & Permission.CREATE) === Permission.CREATE
227232
return hasCreatePermissions

0 commit comments

Comments
 (0)