mirror of
https://github.com/rclone/rclone.git
synced 2025-08-16 16:41:34 +02:00
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 when using `rclone move` the `Transfers` stat did not count up like it should do. This changes introduces a new primitive operations.MoveTransfers which counts moves as Transfers for use where that is appropriate, such as rclone move/moveto. Otherwise moves are counted as checks and their bytes are not accounted. See: #7183 See: https://forum.rclone.org/t/stats-one-line-date-broken-in-1-64-0-and-later/43263/
This commit is contained in:
@ -437,7 +437,7 @@ func (s *syncCopyMove) pairCopyOrMove(ctx context.Context, in *pipe, fdst fs.Fs,
|
||||
dst := pair.Dst
|
||||
if s.DoMove {
|
||||
if src != dst {
|
||||
_, err = operations.Move(ctx, fdst, dst, src.Remote(), src)
|
||||
_, err = operations.MoveTransfer(ctx, fdst, dst, src.Remote(), src)
|
||||
} else {
|
||||
// src == dst signals delete the src
|
||||
err = operations.DeleteFile(ctx, src)
|
||||
|
Reference in New Issue
Block a user