mirror of
https://github.com/rclone/rclone.git
synced 2024-11-22 08:23:47 +01:00
7c6f0cc455
Before this change, a file would sometimes be silently deleted instead of renamed on macOS, due to its unique handling of unicode normalization. Rclone already had a SameObject check in place for case insensitivity before deleting the source (for example if "hello.txt" was renamed to "HELLO.txt"), but had no such check for unicode normalization. After this change, the delete is skipped on macOS if the src and dst filenames normalize to the same NFC string. Example of the previous behavior: ~ % rclone touch /Users/nielash/rename_test/ö ~ % rclone lsl /Users/nielash/rename_test/ö 0 2023-11-21 17:28:06.170486000 ö ~ % rclone moveto /Users/nielash/rename_test/ö /Users/nielash/rename_test/ö -vv 2023/11/21 17:28:51 DEBUG : rclone: Version "v1.64.0" starting with parameters ["rclone" "moveto" "/Users/nielash/rename_test/ö" "/Users/nielash/rename_test/ö" "-vv"] 2023/11/21 17:28:51 DEBUG : Creating backend with remote "/Users/nielash/rename_test/ö" 2023/11/21 17:28:51 DEBUG : Using config file from "/Users/nielash/.config/rclone/rclone.conf" 2023/11/21 17:28:51 DEBUG : fs cache: adding new entry for parent of "/Users/nielash/rename_test/ö", "/Users/nielash/rename_test" 2023/11/21 17:28:51 DEBUG : Creating backend with remote "/Users/nielash/rename_test/" 2023/11/21 17:28:51 DEBUG : fs cache: renaming cache item "/Users/nielash/rename_test/" to be canonical "/Users/nielash/rename_test" 2023/11/21 17:28:51 DEBUG : ö: Size and modification time the same (differ by 0s, within tolerance 1ns) 2023/11/21 17:28:51 DEBUG : ö: Unchanged skipping 2023/11/21 17:28:51 INFO : ö: Deleted 2023/11/21 17:28:51 INFO : Transferred: 0 B / 0 B, -, 0 B/s, ETA - Checks: 1 / 1, 100% Deleted: 1 (files), 0 (dirs) Elapsed time: 0.0s 2023/11/21 17:28:51 DEBUG : 5 go routines active ~ % rclone lsl /Users/nielash/rename_test/ ~ % |
||
---|---|---|
.. | ||
operationsflags | ||
check_test.go | ||
check.go | ||
copy_test.go | ||
copy.go | ||
dedupe_test.go | ||
dedupe.go | ||
listdirsorted_test.go | ||
logger.go | ||
lsjson_test.go | ||
lsjson.go | ||
multithread_test.go | ||
multithread.go | ||
operations_internal_test.go | ||
operations_test.go | ||
operations.go | ||
rc_test.go | ||
rc.go | ||
reopen_test.go | ||
reopen.go |