mirror of
https://github.com/rclone/rclone.git
synced 2024-12-22 15:11:56 +01: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 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:
parent
578b9df6ea
commit
e65e8a4c55
@ -334,7 +334,7 @@ func SameObject(src, dst fs.Object) bool {
|
|||||||
// be nil.
|
// be nil.
|
||||||
func Move(ctx context.Context, fdst fs.Fs, dst fs.Object, remote string, src fs.Object) (newDst fs.Object, err error) {
|
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)
|
ci := fs.GetConfig(ctx)
|
||||||
tr := accounting.Stats(ctx).NewCheckingTransfer(src, "moving")
|
tr := accounting.Stats(ctx).NewTransfer(src)
|
||||||
defer func() {
|
defer func() {
|
||||||
if err == nil {
|
if err == nil {
|
||||||
accounting.Stats(ctx).Renames(1)
|
accounting.Stats(ctx).Renames(1)
|
||||||
|
Loading…
Reference in New Issue
Block a user