mirror of
https://github.com/rclone/rclone.git
synced 2025-08-18 01:20:16 +02:00
bisync: rollback listing on error
Before this change, bisync had no mechanism for "retrying" a file again next time, in the event of an unexpected and possibly temporary error. After this change, bisync is now essentially able to mark a file as needing to be rechecked next time. Bisync does this by keeping one prior listing on hand at all times. In a low-confidence situation, bisync can revert a given file row back to its state at the end of the last known successful sync, ensuring that any subsequent changes will be re-noticed on the next run. This can potentially be helpful for a dynamically changing file system, where files may be changing quickly while bisync is working with them.
This commit is contained in:
@@ -153,6 +153,7 @@ func (b *bisyncRun) fastCopy(ctx context.Context, fsrc, fdst fs.Fs, files bilib.
|
||||
if b.opt.Resync {
|
||||
err = sync.CopyDir(ctxCopyLogger, fdst, fsrc, b.opt.CreateEmptySrcDirs)
|
||||
} else {
|
||||
b.testFn()
|
||||
err = sync.Sync(ctxCopyLogger, fdst, fsrc, b.opt.CreateEmptySrcDirs)
|
||||
}
|
||||
fs.Debugf(nil, "logger is: %v", logger)
|
||||
|
Reference in New Issue
Block a user