[Bug]: Data lost when moving to parent folder with the same name (conflict modal resolve with all new files) #49621
Description
⚠️ This issue respects the following points: ⚠️
- This is a bug, not a question or a configuration/webserver/proxy issue.
- This issue is not already reported on Github OR Nextcloud Community Forum (I've searched it).
- Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- I agree to follow Nextcloud's Code of Conduct.
Bug description
When moving a folder to a parent folder which contains another folder with the same name may result in data loss. Reproducible both on stable NC30 and latest master.
Steps to reproduce
- Create test folder "Test"
- Create "New folder" inside test folder ("Test/New Folder"), put some files
- Create "New folder" inside "Test/New folder", put some files
- Move "Test/New folder/New folder" to parent ("Test/New folder") / or move the same name folder "New folder" from other place to "Test/New folder"
- In conflict dialog choose "Select all new files"
- See "Move or copy action failed" toast, the parent folder "Test/New folder" gets deleted, or if moved from other place, the "New folder" gets deleted.
Expected behavior
The move action successful with correct conflicts resolve that doesn't lead to data loss (e.g. if trashbin is disabled).
Nextcloud Server version
30