1
mirror of https://github.com/rclone/rclone synced 2024-11-27 05:23:40 +01:00
rclone/vfs
Nick Craig-Wood e405ca7733 vfs: make uploaded files retain modtime with non-modtime backends
Before this change if a file was uploaded to a backend which didn't
support modtimes, the time of the file read after the upload had
completed would change to the time the file was uploaded on the
backend.

When using `--vfs-cache-mode writes` or `full` this time would be
different by the `--vfs-write-back` delay which would cause
applications to think the file had been modified.

This changes uses the last modification time read by the OS as a
virtual modtime for backends which don't support setting modtimes. It
does not change the modtime to that actually uploaded.

This means that as long as the file remains in the directory cache it
will have the expected modtime.

See: https://forum.rclone.org/t/saving-files-causes-wrong-modified-time-to-be-set-for-a-few-seconds-on-webdav-mount-with-bitrix24/36451
2023-03-10 15:00:01 +00:00
..
test_vfs Replace deprecated ioutil 2022-11-07 11:41:47 +00:00
vfscache test: replace defer cleanup with t.Cleanup 2022-12-09 14:38:05 +00:00
vfscommon build: add package comments to silence revive linter 2022-08-28 13:43:51 +02:00
vfsflags all: Apply codeql fixes 2023-02-23 10:31:51 +00:00
vfstest Replace deprecated ioutil 2022-11-07 11:41:47 +00:00
dir_handle_test.go test: replace defer cleanup with t.Cleanup 2022-12-09 14:38:05 +00:00
dir_handle.go Spelling fixes 2020-10-14 15:21:31 +01:00
dir_test.go vfs: log size of File and Dir in tests for optimization 2023-03-07 11:40:50 +00:00
dir.go vfs: fix rename of directory containing files to be uploaded 2023-03-07 11:40:50 +00:00
errors_test.go vfs: add tests and subsequent fixes 2017-11-04 10:24:10 +00:00
errors.go build: drop support for go1.8 2019-04-15 21:49:58 +01:00
file_test.go vfs: log size of File and Dir in tests for optimization 2023-03-07 11:40:50 +00:00
file.go vfs: make uploaded files retain modtime with non-modtime backends 2023-03-10 15:00:01 +00:00
help.go build: reformat comments to pass go1.19 vet 2022-08-05 16:35:41 +01:00
make_open_tests.go Replace deprecated ioutil 2022-11-07 11:41:47 +00:00
open_test.go vfs: bring DO NOT EDIT comments in line with "go help generate" 2020-04-30 12:24:44 +01:00
rc_test.go test: replace defer cleanup with t.Cleanup 2022-12-09 14:38:05 +00:00
rc.go vfs: add vfs/stats remote control to show statistics - fixes #5816 2021-11-23 18:00:21 +00:00
read_test.go test: replace defer cleanup with t.Cleanup 2022-12-09 14:38:05 +00:00
read_write_test.go test: replace defer cleanup with t.Cleanup 2022-12-09 14:38:05 +00:00
read_write.go build: reformat comments to pass go1.19 vet 2022-08-05 16:35:41 +01:00
read.go build: reformat comments to pass go1.19 vet 2022-08-05 16:35:41 +01:00
vfs_case_test.go test: replace defer cleanup with t.Cleanup 2022-12-09 14:38:05 +00:00
vfs_test.go test: replace defer cleanup with t.Cleanup 2022-12-09 14:38:05 +00:00
vfs.go Replace deprecated ioutil 2022-11-07 11:41:47 +00:00
vfstest_test.go mount: change interface of mount commands to take mount options 2020-07-24 10:48:51 +01:00
vstate_string.go vfs: fix virtual entries causing deleted files to still appear 2020-11-10 16:47:25 +00:00
write_test.go test: replace defer cleanup with t.Cleanup 2022-12-09 14:38:05 +00:00
write.go rcat: preserve metadata when Copy falls back to Rcat 2022-11-10 12:04:35 +00:00