Skip to content

Commit

Permalink
Merge pull request #45865 from nextcloud/backport/45688/stable28
Browse files Browse the repository at this point in the history
[stable28] Show non writable folders during move or copy
  • Loading branch information
blizzz authored Jun 14, 2024
2 parents 3187425 + a20e883 commit b147ef8
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
8 changes: 3 additions & 5 deletions apps/files/src/actions/moveOrCopyAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,17 +200,15 @@ const openFilePickerForAction = async (action: MoveCopyAction, dir = '/', nodes:
const filePicker = getFilePickerBuilder(t('files', 'Choose destination'))
.allowDirectories(true)
.setFilter((n: Node) => {
// We only want to show folders that we can create nodes in
return (n.permissions & Permission.CREATE) !== 0
// We don't want to show the current nodes in the file picker
&& !fileIDs.includes(n.fileid)
// We don't want to show the current nodes in the file picker
return !fileIDs.includes(n.fileid)
})
.setMimeTypeFilter([])
.setMultiSelect(false)
.startAt(dir)

return new Promise((resolve, reject) => {
filePicker.setButtonFactory((_selection, path: string) => {
filePicker.setButtonFactory((selection: Node[], path: string) => {
const buttons: IFilePickerButton[] = []
const target = basename(path)

Expand Down
4 changes: 2 additions & 2 deletions dist/files-init.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/files-init.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/files-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/files-main.js.map

Large diffs are not rendered by default.

0 comments on commit b147ef8

Please sign in to comment.