sync,copy,move: make sure we output a debug log on start of transfer

Before this change we weren't outputing a debug log on the start of a
transfer for files which existed on the source but not in the
destination.

This was different to the single file copy routine.
This commit is contained in:
Nick Craig-Wood 2023-04-03 11:53:51 +01:00
parent 5755e31ef0
commit 2b8af4d23f

View File

@ -407,6 +407,7 @@ func (s *syncCopyMove) pairRenamer(in *pipe, out *pipe, fraction int, wg *sync.W
src := pair.Src src := pair.Src
if !s.tryRename(src) { if !s.tryRename(src) {
// pass on if not renamed // pass on if not renamed
fs.Debugf(src, "Need to transfer - No matching file found at Destination")
ok = out.Put(s.ctx, pair) ok = out.Put(s.ctx, pair)
if !ok { if !ok {
return return
@ -1026,6 +1027,7 @@ func (s *syncCopyMove) SrcOnly(src fs.DirEntry) (recurse bool) {
} }
if !NoNeedTransfer { if !NoNeedTransfer {
// No need to check since doesn't exist // No need to check since doesn't exist
fs.Debugf(src, "Need to transfer - File not found at Destination")
ok := s.toBeUploaded.Put(s.ctx, fs.ObjectPair{Src: x, Dst: nil}) ok := s.toBeUploaded.Put(s.ctx, fs.ObjectPair{Src: x, Dst: nil})
if !ok { if !ok {
return return