Skip to content

Commit f3e1c19

Browse files
artongebackportbot[bot]
authored andcommitted
fix(files): Show non writable folders during move or copy
Signed-off-by: Louis Chemineau <[email protected]>
1 parent 44eba1c commit f3e1c19

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

apps/files/src/actions/moveOrCopyAction.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -200,17 +200,15 @@ const openFilePickerForAction = async (action: MoveCopyAction, dir = '/', nodes:
200200
const filePicker = getFilePickerBuilder(t('files', 'Choose destination'))
201201
.allowDirectories(true)
202202
.setFilter((n: Node) => {
203-
// We only want to show folders that we can create nodes in
204-
return (n.permissions & Permission.CREATE) !== 0
205-
// We don't want to show the current nodes in the file picker
206-
&& !fileIDs.includes(n.fileid)
203+
// We don't want to show the current nodes in the file picker
204+
return !fileIDs.includes(n.fileid)
207205
})
208206
.setMimeTypeFilter([])
209207
.setMultiSelect(false)
210208
.startAt(dir)
211209

212210
return new Promise((resolve, reject) => {
213-
filePicker.setButtonFactory((_selection, path: string) => {
211+
filePicker.setButtonFactory((selection: Node[], path: string) => {
214212
const buttons: IFilePickerButton[] = []
215213
const target = basename(path)
216214

0 commit comments

Comments
 (0)