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/
This commit is contained in:
Nick Craig-Wood 2024-01-04 11:28:47 +00:00
parent 578b9df6ea
commit e65e8a4c55
1 changed files with 1 additions and 1 deletions

View File

@ -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)