From ad9c7ff7ed6441520261dc7a1cae490bb1da2537 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Mon, 30 Mar 2020 16:45:02 +0100 Subject: [PATCH] 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 --- fs/sync/sync.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/sync/sync.go b/fs/sync/sync.go index aa1cceac8..51fadd850 100644 --- a/fs/sync/sync.go +++ b/fs/sync/sync.go @@ -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") }