rclone/fs/config
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
..
configfile config: add more unit tests of save 2023-04-08 21:48:21 +02:00
configflags sync: don't set dir modtimes if already set 2024-03-07 09:57:11 +00:00
configmap all: fix spelling across the project 2022-08-30 11:16:26 +02:00
configstruct fs: create fs.Enum for easy creation of parameters from a list of choices 2023-10-03 15:14:24 +01:00
flags build: fix lint errors when re-enabling revive exported & package-comments 2023-08-29 13:03:13 +01:00
obscure Remove github.com/pkg/errors and replace with std library version 2021-11-07 11:53:30 +00:00
testdata Break the fs package up into smaller parts. 2018-01-15 17:51:14 +00:00
authorize.go authorize: add support for custom templates 2023-02-24 15:08:38 +00:00
config.go config: stop config create making invalid config files 2023-05-03 11:40:30 +01:00
config_read_password.go fs/config, lib/terminal: use golang.org/x/term 2022-04-01 12:48:18 +01:00
config_read_password_unsupported.go fs/config, lib/terminal: use golang.org/x/term 2022-04-01 12:48:18 +01:00
config_test.go config: delay load config file (#5258) 2021-04-26 23:37:49 +02:00
crypt.go Replace deprecated ioutil 2022-11-07 11:41:47 +00:00
crypt_internal_test.go config: split up main file more and move tests into correct packages 2021-03-11 17:29:26 +00:00
crypt_test.go config: delay load config file (#5258) 2021-04-26 23:37:49 +02:00
default_storage.go config: replace defaultConfig with a thread-safe in-memory implementation 2021-05-07 16:04:09 +01:00
default_storage_test.go config: replace defaultConfig with a thread-safe in-memory implementation 2021-05-07 16:04:09 +01:00
rc.go config: add config/paths to the rc as rclone config paths equivalent 2024-01-18 17:47:39 +00:00
rc_test.go config: add config/paths to the rc as rclone config paths equivalent 2024-01-18 17:47:39 +00:00
ui.go rclone config redacted: implement support mechanism for showing redacted config 2023-07-07 16:25:14 +01:00
ui_test.go backend: add description field for all backends 2024-01-03 10:57:59 +00:00