diff options
author | Ferdinand Thiessen <opensource@fthiessen.de> | 2024-01-26 14:44:51 +0100 |
---|---|---|
committer | Ferdinand Thiessen <opensource@fthiessen.de> | 2024-01-26 14:55:03 +0100 |
commit | 9d949c15a291d9069aa2d421c413ff0fc31b5744 (patch) | |
tree | ecd402ea020d04b797ee003e0e17f9b761bbebfb /apps/files/src | |
parent | b0c003d7bed709ccb1bf95aec6cac25378d57fd1 (diff) | |
download | nextcloud-server-9d949c15a291d9069aa2d421c413ff0fc31b5744.tar.gz nextcloud-server-9d949c15a291d9069aa2d421c413ff0fc31b5744.zip |
chore: Update `@nextcloud/dialogs` to 5.1.1
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'apps/files/src')
-rw-r--r-- | apps/files/src/actions/moveOrCopyAction.ts | 8 |
1 files changed, 6 insertions, 2 deletions
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'))) + } }) }) } |