adobe / da-live

Document Authoring is an early-access technology preview from Adobe.
https://da.live
Apache License 2.0
10 stars 16 forks source link

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

Closed bosschaert closed 1 month ago

bosschaert commented 4 months 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.

bosschaert commented 1 month ago

Seems like this issue has been fixed in the mean time.