Compare commits

...
Sign in to create a new pull request.

1 commit

Author SHA1 Message Date
Nick Craig-Wood
e65e8a4c55 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/
2024-01-04 11:40:45 +00:00

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)