mirror of
https://github.com/rclone/rclone.git
synced 2025-02-20 07:48:33 +02:00
moveto, copyto: report transfers and checks as per move and copy
This commit is contained in:
parent
d30cc1e119
commit
a61ba1e7c4
@ -1528,11 +1528,17 @@ func moveOrCopyFile(fdst Fs, fsrc Fs, dstFileName string, srcFileName string, cp
|
|||||||
}
|
}
|
||||||
|
|
||||||
if NeedTransfer(dstObj, srcObj) {
|
if NeedTransfer(dstObj, srcObj) {
|
||||||
return Op(fdst, dstObj, dstFileName, srcObj)
|
Stats.Transferring(srcFileName)
|
||||||
} else if !cp {
|
err = Op(fdst, dstObj, dstFileName, srcObj)
|
||||||
return DeleteFile(srcObj)
|
Stats.DoneTransferring(srcFileName, err == nil)
|
||||||
|
} else {
|
||||||
|
Stats.Checking(srcFileName)
|
||||||
|
if !cp {
|
||||||
|
err = DeleteFile(srcObj)
|
||||||
|
}
|
||||||
|
defer Stats.DoneChecking(srcFileName)
|
||||||
}
|
}
|
||||||
return nil
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// MoveFile moves a single file possibly to a new name
|
// MoveFile moves a single file possibly to a new name
|
||||||
|
Loading…
x
Reference in New Issue
Block a user