rclone/cmd
nielash 8c69455c37 sync: don't set dir modtimes if already set
Before this change, directory modtimes (and metadata) were always synced from
src to dst, even if already in sync (i.e. their modtimes already matched.) This
potentially required excessive API calls, made logs noisy, and was potentially
problematic for backends that create "versions" or otherwise log activity
updates when modtime/metadata is updated.

After this change, a new DirsEqual function is added to check whether dirs are
equal based on a number of factors such as ModifyWindow and sync flags in use.
If the dirs are equal, the modtime/metadata update is skipped.

For backends that require setDirModTimeAfter, the "after" sync is performed only
for dirs that could have been changed by the sync (i.e. dirs containing files
that were created/updated.)

Note that dir metadata (other than modtime) is not currently considered by
DirsEqual, consistent with how object metadata is synced (only when objects are
unequal for reasons other than metadata).

To sync dir modtimes and metadata unconditionally (the previous behavior), use
--ignore-times.
2024-03-07 09:57:11 +00:00
..
about docs: group the global flags and make them appear on command and flags pages 2023-08-02 12:53:09 +01:00
all nfsmount: New mount command to provide mount mechanism on macOS without FUSE 2023-10-06 14:08:20 +01:00
authorize docs: group the global flags and make them appear on command and flags pages 2023-08-02 12:53:09 +01:00
backend docs: group the global flags and make them appear on command and flags pages 2023-08-02 12:53:09 +01:00
bisync sync: don't set dir modtimes if already set 2024-03-07 09:57:11 +00:00
cachestats docs: add minimum versions to the command pages 2022-12-03 18:58:55 +01:00
cat docs: group the global flags and make them appear on command and flags pages 2023-08-02 12:53:09 +01:00
check docs: group the global flags and make them appear on command and flags pages 2023-08-02 12:53:09 +01:00
checksum operations: add operations/check to the rc API 2023-10-04 17:52:57 +01:00
cleanup docs: group the global flags and make them appear on command and flags pages 2023-08-02 12:53:09 +01:00
cmount vfs: fix unicode normalization on macOS - fixes #7072 2024-03-06 16:12:13 +00:00
config docs: group the global flags and make them appear on command and flags pages 2023-08-02 12:53:09 +01:00
copy sync: implement directory sync for mod times and metadata 2024-02-28 16:26:14 +00:00
copyto docs: group the global flags and make them appear on command and flags pages 2023-08-02 12:53:09 +01:00
copyurl copyurl: add troubleshooting section to the docs 2024-02-29 14:58:12 +00:00
cryptcheck docs: group the global flags and make them appear on command and flags pages 2023-08-02 12:53:09 +01:00
cryptdecode docs: group the global flags and make them appear on command and flags pages 2023-08-02 12:53:09 +01:00
dedupe docs: group the global flags and make them appear on command and flags pages 2023-08-02 12:53:09 +01:00
delete docs: group the global flags and make them appear on command and flags pages 2023-08-02 12:53:09 +01:00
deletefile docs: group the global flags and make them appear on command and flags pages 2023-08-02 12:53:09 +01:00
genautocomplete cmd: make auto completion work for all shells and reduce the size 2024-02-29 14:46:50 +00:00
gendocs docs: group the global flags and make them appear on command and flags pages 2023-08-02 12:53:09 +01:00
hashsum docs: show hashsum arguments as optional in usage string 2023-11-03 23:31:00 +01:00
link docs: group the global flags and make them appear on command and flags pages 2023-08-02 12:53:09 +01:00
listremotes backend: add description field for all backends 2024-01-03 10:57:59 +00:00
ls docs: group the global flags and make them appear on command and flags pages 2023-08-02 12:53:09 +01:00
lsd docs: group the global flags and make them appear on command and flags pages 2023-08-02 12:53:09 +01:00
lsf local: implement modtime and metadata for directories 2024-02-28 16:09:04 +00:00
lsjson lsjson: make sure we set the global metadata flag too 2023-09-21 16:15:38 +01:00
lsl docs: group the global flags and make them appear on command and flags pages 2023-08-02 12:53:09 +01:00
md5sum docs: group the global flags and make them appear on command and flags pages 2023-08-02 12:53:09 +01:00
mkdir docs: group the global flags and make them appear on command and flags pages 2023-08-02 12:53:09 +01:00
mount mount: disable mount for freebsd 2023-10-29 15:46:41 +00:00
mount2 nfsmount: New mount command to provide mount mechanism on macOS without FUSE 2023-10-06 14:08:20 +01:00
mountlib vfs: fix unicode normalization on macOS - fixes #7072 2024-03-06 16:12:13 +00:00
move sync: implement directory sync for mod times and metadata 2024-02-28 16:26:14 +00:00
moveto docs: group the global flags and make them appear on command and flags pages 2023-08-02 12:53:09 +01:00
ncdu ncdu: fix crash when re-entering changed directory after rescan 2023-10-24 14:26:57 +01:00
nfsmount nfsmount: fix --volname being ignored #7503 2024-02-18 05:08:59 -05:00
obscure docs: add minimum versions to the command pages 2022-12-03 18:58:55 +01:00
purge docs: group the global flags and make them appear on command and flags pages 2023-08-02 12:53:09 +01:00
rc rc: always report an error as JSON 2023-09-20 21:57:40 +01:00
rcat docs: group the global flags and make them appear on command and flags pages 2023-08-02 12:53:09 +01:00
rcd cmd: refactor and use sysdnotify in more commands 2023-09-04 16:32:04 +01:00
reveal docs: add minimum versions to the command pages 2022-12-03 18:58:55 +01:00
rmdir docs: group the global flags and make them appear on command and flags pages 2023-08-02 12:53:09 +01:00
rmdirs rmdirs: remove directories concurrently controlled by --checkers 2023-08-18 12:05:15 +01:00
selfupdate selfupdate: fix crash in tests if beta not found 2023-12-10 22:29:57 +00:00
serve serve webdav: fix --baseurl without leading / 2024-02-21 18:08:44 +00:00
settier docs: add minimum versions to the command pages 2022-12-03 18:58:55 +01:00
sha1sum docs: group the global flags and make them appear on command and flags pages 2023-08-02 12:53:09 +01:00
size size: dont show duplicate object count when less than 1k 2023-11-14 16:44:12 +00:00
sync sync: implement directory sync for mod times and metadata 2024-02-28 16:26:14 +00:00
test amazonclouddrive: remove Amazon Drive backend code and docs #7539 2024-01-04 17:05:54 +00:00
touch docs: group the global flags and make them appear on command and flags pages 2023-08-02 12:53:09 +01:00
tree docs: group the global flags and make them appear on command and flags pages 2023-08-02 12:53:09 +01:00
version docs: group the global flags and make them appear on command and flags pages 2023-08-02 12:53:09 +01:00
cmd.go cmd: refactor --retries and --retries-sleep to global config 2024-02-12 13:24:54 -05:00
completion.go cmd: make auto completion work for all shells and reduce the size 2024-02-29 14:46:50 +00:00
help.go cmd: make auto completion work for all shells and reduce the size 2024-02-29 14:46:50 +00:00
progress.go cmd: Make --progress output logs in the same format as without 2023-10-11 11:36:31 +01:00
selfupdate_disabled.go build: apply gofmt from golang 1.17 2021-09-09 20:43:59 +03:00
selfupdate_enabled.go build: apply gofmt from golang 1.17 2021-09-09 20:43:59 +03:00
siginfo_bsd.go cmd: Enable SIGINFO (Ctrl-T) handler on FreeBSD, NetBSD, OpenBSD and Dragonfly BSD 2022-11-07 11:45:04 +00:00
siginfo_others.go cmd: Enable SIGINFO (Ctrl-T) handler on FreeBSD, NetBSD, OpenBSD and Dragonfly BSD 2022-11-07 11:45:04 +00:00