nextcloud / nextcloud/server

Copy file fails if filename already exists in the target folder

Open
#30,388 10 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop 25-feedback enhancement feature: files hotspot: filename handling
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

Tested with c.nc.com version 23.0.0.10

Have a two folders with the same file:

  • /A/B/test.txt
  • /A/C/test.txt

Try to copy /A/B/test.txt to /A/C from the web interface ("move or copy" operation in the "..."-menu)

Result

Error message is show: Could not copy "test.txt", target exists

Expected

Show the conflict dialog and allow the user to chose which version they want to keep, same as we show during upload of files with the same filename.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the web interface's "move or copy" operation and compare its handling of an existing filename with the upload flow's conflict dialog. Trace the relevant copy and upload entry points, then verify that copying into a folder with the same filename presents the conflict choices and lets the user select which version to keep.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, php
Domain
cloud, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.