Skip to content

Commit 38919a0

Browse files
committed
fix(files): Disable buttons in copy/move dialog for non writable folders
Signed-off-by: Louis Chemineau <louis@chmn.me>
1 parent c2243ff commit 38919a0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

apps/files/src/actions/moveOrCopyAction.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ const openFilePickerForAction = async (action: MoveCopyAction, dir = '/', nodes:
202202
label: target ? t('files', 'Copy to {target}', { target }, undefined, { escape: false, sanitize: false }) : t('files', 'Copy'),
203203
type: 'primary',
204204
icon: CopyIconSvg,
205+
disabled: selection.some((node) => (node.permissions & Permission.CREATE) === 0),
205206
async callback(destination: Node[]) {
206207
resolve({
207208
destination: destination[0] as Folder,

0 commit comments

Comments
 (0)