Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

bisync: fix failed transfers of empty files being recorded as synced

Nick Craig-Wood7e17e1b90d89
diff --git a/cmd/bisync/listing.go b/cmd/bisync/listing.go
index 181301ef4..282565ff6 100644
--- a/cmd/bisync/listing.go
+++ b/cmd/bisync/listing.go
@@ -675,7 +675,7 @@ func (b *bisyncRun) modifyListing(ctx context.Context, src fs.Fs, dst fs.Fs, res
b.debugFn(tr.Name, func() {
prettyprint(tr, tr.Name, fs.LogLevelInfo)
})
- if tr.Error == nil && tr.Bytes > 0 || tr.Size <= 0 {
+ if tr.Error == nil && (tr.Bytes > 0 || tr.Size <= 0) {
prettyprint(tr, "keeping: "+tr.Name, fs.LogLevelDebug)
toKeep = append(toKeep, tr.Name)
}