feup-infolab / dendro

"Open-source Dropbox" with added description features. It is a data storage and description platform designed to help researchers and other users to describe their data files, built on Linked Open Data and ontologies. Users can use Dendro to publish data to CKAN, Zenodo, DSpace or EUDAT's B2Share and others.
http://dendro.fe.up.pt
Other
28 stars 3 forks source link

[IMPROVEMENT] Should autorename a file/folder when the user tries to rename a file/folder into a name that already exists #275

Closed NelsonPereira1991 closed 7 years ago

NelsonPereira1991 commented 7 years ago

Dendro Version if known (or site URL)

Tested in the branch machine-plus-human-identifiers

In the commit

Please describe the expected behaviour

When the user tries to rename a file/folder with a name that already exists, it should be autorenamed automatically with the name concatenated with "Copy_created" and the timestamp. The uploads already have this behaviour implemented.

Please describe the actual behaviour

Two or more files with the same name exist and the rename operation is allowed

What steps can be taken to reproduce the issue?

Upload two pdf files with different names (file1.pdf and file2.pdf) then try to rename file2.pdf into file1.pdf. You will see that it will result in two pdf files with the exact same name.

An example: screen shot 2017-11-07 at 14 17 16

Possible ways to fix the problem (programmers)

Debug the save resource method ???

silvae86 commented 7 years ago

@NelsonPereira1991 This was solved with adding the (Copy)... at the start of the file name, right? Please close issue.

NelsonPereira1991 commented 7 years ago

@silvae86 That was only solved for upload operations (meaning when a user uploads a file into Dendro with a name of a resource that already exists in a specific parent folder/project). This issue is specific to when a user tries to rename an already existing file/folder in a parent folder/project into a name of a resource that already exists in that same parent folder/project. It should warn the user or auto rename it as well, like in the upload case.

NelsonPereira1991 commented 7 years ago

DO NOT CLOSE THIS YET!! See the previous comment

NelsonPereira1991 commented 7 years ago

There is also a issue when creating folders with the same name and under the same parent. I'm working on both these issues right now.

NelsonPereira1991 commented 7 years ago

fixed in https://github.com/feup-infolab/dendro/pull/299