adobe / da-live

Dark Alley is a research project
https://da.live
Apache License 2.0
7 stars 11 forks source link

Copy-paste + rename in same dir causes original to disappear #187

Open bosschaert opened 1 week ago

bosschaert commented 1 week ago

When copying a document and pasting it back in the same directory and then renaming the document, the original is deleted and when opened shows an empty document.

Here's how to reproduce:

Copy a document and paste it in the same directory. The UI now shows 2 documents with the same name (even though 1 is only really there):

Screenshot 2024-07-04 at 15 12 51

Then rename the copied document to something else. Note that the original file name still shows, even though that file doesn't exist any more because the copy has been renamed to something else:

Screenshot 2024-07-04 at 15 13 04

Now open the original document (d2 in this case) and it shows empty.

Problem to be fixed

When copying and pasting the UI should check if the target file of the copy already exists and if so, suffix the name with something to make it unique, like _Copy or similar, to avoid overwriting any existing documents.

The da-admin backend could check if the target for the copy already exists and refuse the copy operation of it does.