Skip to content

Commit 7ec3a26

Browse files
committed
Merge #274 [fix 29]setFilter in moveOrCopyAction
2 parents ffd0580 + feecba7 commit 7ec3a26

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

apps/files/src/actions/moveOrCopyAction.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,11 @@ async function openFilePickerForAction(
241241
// We don't want to show the current nodes in the file picker
242242
return !fileIDs.includes(n.fileid)
243243
})
244+
.setFilter((n: Node) => {
245+
// We only want to show folders in the file picker
246+
// We don't want to show encrypted folders in the file picker
247+
return !(n.attributes?.['type'] !== "directory" || n.attributes?.['is-encrypted'] === 1)
248+
})
244249
.setMimeTypeFilter([])
245250
.setMultiSelect(false)
246251
.startAt(dir)

0 commit comments

Comments
 (0)