rclone/cmd/bisync
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
..
bilib bisync: add options to auto-resolve conflicts - fixes #7471 2024-01-20 17:17:01 -05:00
testdata sync: don't set dir modtimes if already set 2024-03-07 09:57:11 +00:00
bisync_test.go sync: don't set dir modtimes if already set 2024-03-07 09:57:11 +00:00
checkfn.go bisync: add --resync-mode for customizing --resync - fixes #5681 2024-01-20 17:17:01 -05:00
cmd.go bisync: use global --retries and --retries-sleep flags instead of overriding 2024-02-12 13:24:54 -05:00
compare.go bisync: full support for comparing checksum, size, modtime - fixes #5679 fixes #5683 fixes #5684 fixes #5675 2024-01-20 16:08:06 -05:00
deltas.go bisync: add options to auto-resolve conflicts - fixes #7471 2024-01-20 17:17:01 -05:00
help.go bisync: document beta status more clearly - fixes #6082 2024-01-20 15:38:26 -05:00
LICENSE.cjnaz bisync: implementation #5164 2021-11-01 21:00:27 +03:00
listing.go bisync: add options to auto-resolve conflicts - fixes #7471 2024-01-20 17:17:01 -05:00
lockfile.go bisync: allow lock file expiration/renewal with --max-lock - #7470 2024-01-20 16:31:28 -05:00
log.go bisync: clarify file operation directions in dry-run logs - fixes #7029 2024-03-06 09:26:53 -05:00
march.go bisync: Graceful Shutdown, --recover from interruptions without --resync - fixes #7470 2024-01-20 16:31:28 -05:00
operations.go bisync: add support for --retries-sleep - fixes #7555 2024-02-12 13:24:54 -05:00
queue.go bisync: use global --retries and --retries-sleep flags instead of overriding 2024-02-12 13:24:54 -05:00
rc.go bisync: support two --backup-dir paths on different remotes 2024-01-20 14:50:08 -05:00
resolve.go bisync: add --resync-mode for customizing --resync - fixes #5681 2024-01-20 17:17:01 -05:00
resync.go bisync: add --resync-mode for customizing --resync - fixes #5681 2024-01-20 17:17:01 -05:00