sync: Fix incorrect "nothing to transfer" message using --delete-before

Before this change the first pass of --delete-before would output
"There was nothing to transfer" and then proceed to transfer things.

This makes sure the message isn't printed in the delete phase.

See: https://forum.rclone.org/t/incorrect-debug-output/15267
This commit is contained in:
Nick Craig-Wood 2020-03-30 16:45:02 +01:00
parent 1af9fcbbfa
commit ad9c7ff7ed

View File

@ -844,7 +844,7 @@ func (s *syncCopyMove) run() error {
// Read the error out of the context if there is one
s.processError(s.ctx.Err())
if accounting.Stats(s.ctx).GetTransfers() == 0 {
if s.deleteMode != fs.DeleteModeOnly && accounting.Stats(s.ctx).GetTransfers() == 0 {
fs.Infof(nil, "There was nothing to transfer")
}