fix(files): properly handle folders without permissions

There was a bug in the filepicker (dialogs library) that passed always
the current folder as selected node even if not pickable (`setCanPick`).
So updated the library.

But we also must check if we have any nodes selected to enable the
copy and move buttons.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
pull/62254/head
Ferdinand Thiessen 1 month ago
parent aae73b11f4
commit 66f55cbbed
No known key found for this signature in database
GPG Key ID: 7E849AE05218500F
  1. 2
      apps/files/src/actions/moveOrCopyAction.ts
  2. 2
      build/frontend-legacy/package.json
  3. 2
      package.json

@ -299,6 +299,7 @@ async function openFilePickerForAction(
if (action === MoveCopyAction.COPY || action === MoveCopyAction.MOVE_OR_COPY) {
buttons.push({
label: target ? t('files', 'Copy to {target}', { target }, { escape: false, sanitize: false }) : t('files', 'Copy'),
disabled: selection.length === 0,
variant: 'primary',
icon: CopyIconSvg,
async callback(destination) {
@ -329,6 +330,7 @@ async function openFilePickerForAction(
if (action === MoveCopyAction.MOVE || action === MoveCopyAction.MOVE_OR_COPY) {
buttons.push({
label: target ? t('files', 'Move to {target}', { target }, { escape: false, sanitize: false }) : t('files', 'Move'),
disabled: selection.length === 0,
variant: action === MoveCopyAction.MOVE ? 'primary' : 'secondary',
icon: FolderMoveSvg,
async callback(destination) {

@ -36,7 +36,7 @@
"@nextcloud/axios": "^2.5.2",
"@nextcloud/browser-storage": "^0.5.0",
"@nextcloud/capabilities": "^1.2.1",
"@nextcloud/dialogs": "^7.4.0",
"@nextcloud/dialogs": "^7.4.1",
"@nextcloud/event-bus": "^3.3.3",
"@nextcloud/files": "^4.0.0",
"@nextcloud/initial-state": "^3.0.0",

@ -48,7 +48,7 @@
"@nextcloud/axios": "^2.5.2",
"@nextcloud/calendar-availability-vue": "^3.0.0",
"@nextcloud/capabilities": "^1.2.1",
"@nextcloud/dialogs": "^7.4.0",
"@nextcloud/dialogs": "^7.4.1",
"@nextcloud/event-bus": "^3.3.3",
"@nextcloud/files": "^4.0.0",
"@nextcloud/initial-state": "^3.0.0",

Loading…
Cancel
Save