mirror of
https://github.com/rclone/rclone.git
synced 2026-10-28 06:18:39 -04:00
vfs: fix renamed items listed twice after a case or Unicode-only match
Before this change, renaming a file or directory through a name that matched it only by ignoring case (`--vfs-case-insensitive`, the default on macOS and Windows) or Unicode normalization left its old entry in the parent directory. The item was listed twice, once under its new name and once under the old key, and the old name still resolved to it until the directory cache expired. `Dir.Rename` removed the parent's entry under the name it was given rather than the item's real name. For a directory renamed within its own parent, this was masked until `36ce1a28f`, which removed a second deletion in `Dir.rename`. After this change, `Dir.Rename` removes the entry under the item's real name. The issue was discovered on the bisync integration tests.
This commit is contained in:
500 Internal Server Error
Gitea Version: 1.28.0+dev-477-g8b6ad49a5f