diff --git a/apps/files/src/actions/moveOrCopyAction.ts b/apps/files/src/actions/moveOrCopyAction.ts index a39d6ca6630d6..96e3b645d626e 100644 --- a/apps/files/src/actions/moveOrCopyAction.ts +++ b/apps/files/src/actions/moveOrCopyAction.ts @@ -221,6 +221,10 @@ async function openFilePickerForAction( // We don't want to show the current nodes in the file picker return !fileIDs.includes(n.fileid) }) + .setFilter((n: Node) => { + // Show only non-encrypted directories 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