Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix(files): Show non writable folders during move or copy
Signed-off-by: Louis Chemineau <[email protected]>
  • Loading branch information
artonge authored and blizzz committed Jun 14, 2024
commit 6e9f04b59e8a574eb22a74461b144067385ca8dd
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) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The disabled part is missing?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, as it need the dep update and for now it causes some issues

const buttons: IFilePickerButton[] = []
const target = basename(path)

Expand Down