From 264f3b88c4ec0593cf8b09d81bd4ac08e924fc40 Mon Sep 17 00:00:00 2001 From: Mauro Mura Date: Mon, 27 Oct 2025 11:02:57 +0100 Subject: [PATCH] Refine file picker filter for folders Update file picker filter to show only folders and exclude encrypted ones. --- apps/files/src/actions/moveOrCopyAction.ts | 5 +++++ 1 file changed, 5 insertions(+) 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