Skip to content

Commit 6bcf157

Browse files
sgyurismemurats
authored andcommitted
setFilter in moveOrCopyAction
(cherry picked from commit feecba7)
1 parent e93f200 commit 6bcf157

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
@@ -230,6 +230,11 @@ async function openFilePickerForAction(
230230
const hasCreatePermissions = (n.permissions & Permission.CREATE) === Permission.CREATE
231231
return hasCreatePermissions
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)