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'
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')))
+ }
})
})
}
"@nextcloud/browserslist-config": "^3.0.0",
"@nextcloud/calendar-availability-vue": "^2.0.1",
"@nextcloud/capabilities": "^1.0.4",
- "@nextcloud/dialogs": "^5.1.0",
+ "@nextcloud/dialogs": "^5.1.1",
"@nextcloud/event-bus": "^3.1.0",
"@nextcloud/files": "^3.1.0",
"@nextcloud/initial-state": "^2.0.0",
}
},
"node_modules/@nextcloud/dialogs": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/@nextcloud/dialogs/-/dialogs-5.1.0.tgz",
- "integrity": "sha512-SHoM9vasgzq4imnJjOROFVqJkr663ncsO8bRzgKdOpC6rC96wCEOID2+DXJmhq6tVpdHwsXjYNvBogWBwDaMJA==",
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/@nextcloud/dialogs/-/dialogs-5.1.1.tgz",
+ "integrity": "sha512-3jQdoI1Rw8eTt9bgIZYIkGGguwHYWhOMTMu+5QfX3FlvhI7Z086PKN1YSlLmudV9ZyXFuC5zp2o2FYjTvLcwQw==",
"dependencies": {
"@nextcloud/axios": "^2.4.0",
"@nextcloud/event-bus": "^3.1.0",
"@nextcloud/router": "^2.2.0",
"@nextcloud/typings": "^1.7.0",
"@types/toastify-js": "^1.12.3",
- "@vueuse/core": "^10.7.1",
+ "@vueuse/core": "^10.7.2",
"toastify-js": "^1.12.0",
"vue-frag": "^1.4.3",
"webdav": "^5.3.1"
"@nextcloud/browserslist-config": "^3.0.0",
"@nextcloud/calendar-availability-vue": "^2.0.1",
"@nextcloud/capabilities": "^1.0.4",
- "@nextcloud/dialogs": "^5.1.0",
+ "@nextcloud/dialogs": "^5.1.1",
"@nextcloud/event-bus": "^3.1.0",
"@nextcloud/files": "^3.1.0",
"@nextcloud/initial-state": "^2.0.0",