Browse Source

Update moveOrCopyAction.ts

Check nodes for CREATE permission
pull/51532/head
Mauro Mura 7 months ago
committed by GitHub
parent
commit
123f961504
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 7
      apps/files/src/actions/moveOrCopyAction.ts

7
apps/files/src/actions/moveOrCopyAction.ts

@ -222,12 +222,7 @@ async function openFilePickerForAction(
// We don't want to show the current nodes in the file picker
return !fileIDs.includes(n.fileid)
})
.setFilter((n: Node) => {
// We only want to show folders in the file picker
// We don't want to show encrypted folders in the file picker
return n.type === FileType.File
&& n.attributes?.['is-encrypted'] !== 1
})
.setFilter((n: Node) => (n.permissions & Permission.CREATE) === Permission.CREATE)
.setMimeTypeFilter([])
.setMultiSelect(false)
.startAt(dir)

Loading…
Cancel
Save