diff --git a/apps/files/src/actions/moveOrCopyAction.ts b/apps/files/src/actions/moveOrCopyAction.ts index cd90a6ca917e4..8e5508d5c73fd 100644 --- a/apps/files/src/actions/moveOrCopyAction.ts +++ b/apps/files/src/actions/moveOrCopyAction.ts @@ -222,6 +222,11 @@ async function openFilePickerForAction( // We don't want to show the current nodes in the file picker return !fileIDs.includes(n.fileid) }) + .setFilter((n: Node) => { + // We only want to show folders in the file picker + // We don't want to show encrypted folders in the file picker + return !(n.attributes?.['type'] !== "directory" || n.attributes?.['is-encrypted'] === 1) + }) .setCanPick((n) => { const hasCreatePermissions = (n.permissions & Permission.CREATE) === Permission.CREATE return hasCreatePermissions