Skip to content

Commit d1d5ab9

Browse files
committed
Merge #274 [fix 29]setFilter in moveOrCopyAction
2 parents b00c49f + feecba7 commit d1d5ab9

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
@@ -230,6 +230,11 @@ async function openFilePickerForAction(
230230
// We don't want to show the current nodes in the file picker
231231
return !fileIDs.includes(n.fileid)
232232
})
233+
.setFilter((n: Node) => {
234+
// We only want to show folders in the file picker
235+
// We don't want to show encrypted folders in the file picker
236+
return !(n.attributes?.['type'] !== "directory" || n.attributes?.['is-encrypted'] === 1)
237+
})
233238
.setMimeTypeFilter([])
234239
.setMultiSelect(false)
235240
.startAt(dir)

0 commit comments

Comments
 (0)