Skip to content

Commit 0d116eb

Browse files
committed
Merge #277 [fix30] setFilter in moveOrCopyAction
2 parents 02f32d1 + c6d8561 commit 0d116eb

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
@@ -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
.setMimeTypeFilter([])
226231
.setMultiSelect(false)
227232
.startAt(dir)

0 commit comments

Comments
 (0)