Skip to content

Commit 7fe6b86

Browse files
authored
Update file picker filters for folder visibility
Refine file picker filters to only show folders and exclude encrypted ones.
1 parent e73a2b0 commit 7fe6b86

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
@@ -221,6 +221,11 @@ async function openFilePickerForAction(
221221
// We don't want to show the current nodes in the file picker
222222
return !fileIDs.includes(n.fileid)
223223
})
224+
.setFilter((n: Node) => {
225+
// We only want to show folders in the file picker
226+
// We don't want to show encrypted folders in the file picker
227+
return !(n.attributes?.['type'] !== "directory" || n.attributes?.['is-encrypted'] === 1)
228+
})
224229
.setCanPick((n) => {
225230
const hasCreatePermissions = (n.permissions & Permission.CREATE) === Permission.CREATE
226231
return hasCreatePermissions

0 commit comments

Comments
 (0)