rclone/vfs/vfscache
Nick Craig-Wood 1a66ed9315 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 in the cache as the
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-08 12:10:50 +00:00
..
downloaders test: replace defer cleanup with t.Cleanup 2022-12-09 14:38:05 +00:00
writeback all: fix spelling across the project 2022-08-30 11:16:26 +02:00
cache.go vfs: cache: factor common code from InUse and DirtyItem into ItemOrNil 2023-03-08 11:51:13 +00:00
cache_test.go test: replace defer cleanup with t.Cleanup 2022-12-09 14:38:05 +00:00
item.go vfs: make uploaded files retain modtime with non-modtime backends 2023-03-08 12:10:50 +00:00
item_test.go test: replace defer cleanup with t.Cleanup 2022-12-09 14:38:05 +00:00