Skip to content

Commit 0a3cefe

Browse files
committed
Merge #274 [fix 29]setFilter in moveOrCopyAction
2 parents 04bcae5 + feecba7 commit 0a3cefe

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

apps/files/src/actions/moveOrCopyAction.ts

+5
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)