Skip to content
This repository was archived by the owner on Nov 23, 2026. It is now read-only.
This repository was archived by the owner on Nov 23, 2026. It is now read-only.

Copying a file/folder at the same path should be supported #6546

Closed

Description

@ishank011

Steps to reproduce

  1. Right click a file/folder, select 'Copy'.
  2. Copy in the default location, which is the parent of the resource to be copied.

Expected behaviour

A copy of the resource with 'copy' (eg. my folder - copy) appended to the name should be created.

Actual behaviour

In the frontend, you get Failed to copy "$folderName" and no request to backend is sent.

Verified at https://ocis.ocis-traefik.latest.owncloud.works/

Activity

  1. phil-davis commented on Mar 8, 2022

    @phil-davis
    Contributor

    Note: this brings up the discussion about how to auto-generate a new name. Add (2) (3) ... to the resource name. Call them my folder -copy my folder -copy - copy, or...

    cs3org/reva#2510 has plenty of discussion, in that case for when the public uploads a resource where the name already exists in the public upload-only folder. In that case the server needs to handle and resolve the duplicate-name collision.

    In the case of this issue, the "web" client can itself generate the new unique name.

    In other situations of this type, maybe some client will be responsible to generate the resource name, or maybe there are other situations where the client won't realise/know about the name-collision in advance, and so the server will have to resolve it...

    We could:

    1. agree on a unique-name-generating algorithm, and then make sure to implement the agreed algorithm the same way in the server and each client; or
    2. have the server "control" this - clients that need to generate a unique name could send a resource name to the server, and the server can do the work of generating the unique name (e.g. checking to see if there is already file (2) file (3)...) and send back a resourced name, like file (4). Then all clients would end up "implementing" the same scheme. And if someone wants, the server can be made to have a flexible way of choosing the naming scheme in its settings.
  2. diocas commented on Mar 8, 2022

    @diocas
    Contributor

    Duplicate of #5761 #3751 ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Early-Adopter:CERNType:Bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions