1
mirror of https://github.com/rclone/rclone synced 2024-12-11 23:54:00 +01:00
rclone/vfs
Nick Craig-Wood 84191ac6dc vfs: fix incorrect modtime for mv into mount with --vfs-cache-modes write
When a file has its modtime set while it is open we delay setting the
modtime until the file is closed.

The file is then uploaded in Flush. In Release we check the cached
file has been uploaded by comparing modtimes and or hashes and upload
it again if it has changed.

Before this change we forgot to change the time on the cached file
when we updated the time file on the object, so this mean that Release
reset the time to the wrong time and uploaded the file again on
remotes which don't support hashes (eg crypt).

The fix was to set the modtime of the cached file at the same time we
set the modtime of the remote object. This means that the files check
as identical in Release so it doesn't try to upload the file.

This means that we avoid a double upload and the modtime is correct.

See: https://forum.rclone.org/t/modification-time-with-vfs-cache/13906/8
2020-01-19 12:52:48 +00:00
..
test_vfs lib/random: unify random string generation into random.String 2019-08-06 12:44:08 +01:00
vfsflags vfs: add flag --vfs-case-insensitive for windows/macOS mounts 2019-09-04 21:30:48 +01:00
cache_test.go Add test for cache renaming functionality 2019-11-10 11:58:46 +00:00
cache.go vfs: fix incorrect modtime for mv into mount with --vfs-cache-modes write 2020-01-19 12:52:48 +00:00
dir_handle_test.go build: fix up package paths after repo move 2019-07-28 18:47:38 +01:00
dir_handle.go vfs: factor duplicated Open code into vfs from mount/cmount 2017-11-03 13:00:00 +00:00
dir_test.go vfs: stop empty dirs disappearing when renamed on bucket based remotes 2019-10-14 14:38:30 +01:00
dir.go vfs: revise locking in file and dir to fix race conditions 2019-11-11 16:20:27 +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: skip rename tests on remotes which can't rename 2020-01-05 12:34:47 +00:00
file.go vfs: fix incorrect modtime for mv into mount with --vfs-cache-modes write 2020-01-19 12:52:48 +00:00
help.go vfs: implement --vfs-cache-max-size to limit the total size of the cache 2019-02-02 12:30:10 +00:00
make_open_tests.go build: fix up package paths after repo move 2019-07-28 18:47:38 +01:00
open_test.go vfs: Make OpenFile and friends return EINVAL if O_RDONLY and O_TRUNC 2018-02-26 17:04:27 +00:00
rc.go build: fix up package paths after repo move 2019-07-28 18:47:38 +01:00
read_test.go build: fix up package paths after repo move 2019-07-28 18:47:38 +01:00
read_write_test.go vfs: fix incorrect modtime for mv into mount with --vfs-cache-modes write 2020-01-19 12:52:48 +00:00
read_write.go vfs: fix open file renaming on drive when using --vfs-cache-mode writes 2020-01-13 17:37:54 +00:00
read.go vfs: make ReadAt for non cached files work better with non-sequential reads 2019-11-11 16:20:27 +00:00
vfs_case_test.go vfs: skip TestCaseSensitivity on case insensitive backends 2019-09-06 10:44:59 +01:00
vfs_test.go build: fix up package paths after repo move 2019-07-28 18:47:38 +01:00
vfs.go vfs: stop change notify polling clearing so much of the directory cache 2019-10-21 20:51:11 +01:00
write_test.go azureblob/b2/dropbox/gcs/koofr/qingstor/s3: fix 0 length files 2019-08-06 15:18:08 +01:00
write.go vfs: make write without cache more efficient 2019-08-08 12:37:50 +01:00