diff --git a/apps/files/src/actions/moveOrCopyAction.ts b/apps/files/src/actions/moveOrCopyAction.ts index a39d6ca6630d6..1418744608be6 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 @@ -238,7 +242,7 @@ async function openFilePickerForAction( if (action === MoveCopyAction.COPY || action === MoveCopyAction.MOVE_OR_COPY) { buttons.push({ label: target ? t('files', 'Copy to {target}', { target }, undefined, { escape: false, sanitize: false }) : t('files', 'Copy'), - type: 'primary', + variant: 'primary', icon: CopyIconSvg, async callback(destination: Node[]) { resolve({ @@ -268,7 +272,7 @@ async function openFilePickerForAction( if (action === MoveCopyAction.MOVE || action === MoveCopyAction.MOVE_OR_COPY) { buttons.push({ label: target ? t('files', 'Move to {target}', { target }, undefined, { escape: false, sanitize: false }) : t('files', 'Move'), - type: action === MoveCopyAction.MOVE ? 'primary' : 'secondary', + variant: action === MoveCopyAction.MOVE ? 'primary' : 'secondary', icon: FolderMoveSvg, async callback(destination: Node[]) { resolve({