From e65e8a4c55680ea9c6df950b3fc6e8fbef7475ed Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Thu, 4 Jan 2024 11:28:47 +0000 Subject: [PATCH] operations: fix files moved by rclone move not being counted as transfers Before this change we were only counting moves as checks. This means that using `rclone move` the `Transfers` stat did not count up like it should do. This changes reclassifies moves as Transfers which fixes the problem. See: https://forum.rclone.org/t/stats-one-line-date-broken-in-1-64-0-and-later/43263/ --- fs/operations/operations.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/operations/operations.go b/fs/operations/operations.go index a7e2f6d50..66e68ab93 100644 --- a/fs/operations/operations.go +++ b/fs/operations/operations.go @@ -334,7 +334,7 @@ func SameObject(src, dst fs.Object) bool { // be nil. func Move(ctx context.Context, fdst fs.Fs, dst fs.Object, remote string, src fs.Object) (newDst fs.Object, err error) { ci := fs.GetConfig(ctx) - tr := accounting.Stats(ctx).NewCheckingTransfer(src, "moving") + tr := accounting.Stats(ctx).NewTransfer(src) defer func() { if err == nil { accounting.Stats(ctx).Renames(1)