mirror of
https://github.com/rclone/rclone.git
synced 2024-12-23 15:38:57 +01: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) {
|
||||
return Op(fdst, dstObj, dstFileName, srcObj)
|
||||
} else if !cp {
|
||||
return DeleteFile(srcObj)
|
||||
Stats.Transferring(srcFileName)
|
||||
err = Op(fdst, dstObj, dstFileName, 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
|
||||
|
Loading…
Reference in New Issue
Block a user