Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ishank011 opened this issue Mar 7, 2022 · 2 comments
Closed

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

ishank011 opened this issue Mar 7, 2022 · 2 comments
Labels
Early-Adopter:CERN Type:Bug Something isn't working

Comments

@ishank011
Copy link

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/

@ishank011 ishank011 added Type:Bug Something isn't working Early-Adopter:CERN labels Mar 7, 2022
@phil-davis
Copy link
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.

@diocas
Copy link
Contributor

diocas commented Mar 8, 2022

Duplicate of #5761 #3751 ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Early-Adopter:CERN Type:Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants