Skip to content

Commit c6d8561

Browse files
committed
setFilter in moveOrCopyAction
(cherry picked from commit feecba7)
1 parent 568bd4f commit c6d8561

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
@@ -211,6 +211,11 @@ async function openFilePickerForAction(
211211
// We don't want to show the current nodes in the file picker
212212
return !fileIDs.includes(n.fileid)
213213
})
214+
.setFilter((n: Node) => {
215+
// We only want to show folders in the file picker
216+
// We don't want to show encrypted folders in the file picker
217+
return !(n.attributes?.['type'] !== "directory" || n.attributes?.['is-encrypted'] === 1)
218+
})
214219
.setMimeTypeFilter([])
215220
.setMultiSelect(false)
216221
.startAt(dir)

0 commit comments

Comments
 (0)