From 9d949c15a291d9069aa2d421c413ff0fc31b5744 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Fri, 26 Jan 2024 14:44:51 +0100 Subject: chore: Update `@nextcloud/dialogs` to 5.1.1 Signed-off-by: Ferdinand Thiessen --- apps/files/src/actions/moveOrCopyAction.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'apps/files/src') diff --git a/apps/files/src/actions/moveOrCopyAction.ts b/apps/files/src/actions/moveOrCopyAction.ts index a4e70caf37d..7fa899dc7da 100644 --- a/apps/files/src/actions/moveOrCopyAction.ts +++ b/apps/files/src/actions/moveOrCopyAction.ts @@ -29,7 +29,7 @@ import type { MoveCopyResult } from './moveOrCopyActionUtils' import { AxiosError } from 'axios' import { basename, join } from 'path' import { emit } from '@nextcloud/event-bus' -import { getFilePickerBuilder, showError } from '@nextcloud/dialogs' +import { FilePickerClosed, getFilePickerBuilder, showError } from '@nextcloud/dialogs' import { Permission, FileAction, FileType, NodeStatus, davGetClient, davRootPath, davResultToNode, davGetDefaultPropfind } from '@nextcloud/files' import { translate as t } from '@nextcloud/l10n' import Vue from 'vue' @@ -232,7 +232,11 @@ const openFilePickerForAction = async (action: MoveCopyAction, dir = '/', nodes: const picker = filePicker.build() picker.pick().catch((error) => { logger.debug(error as Error) - reject(new Error(t('files', 'Cancelled move or copy operation'))) + if (error instanceof FilePickerClosed) { + reject(new Error(t('files', 'Cancelled move or copy operation'))) + } else { + reject(new Error(t('files', 'Move or copy operation failed'))) + } }) }) } -- cgit v1.2.3