1
0
mirror of https://github.com/gilbertchen/duplicacy synced 2025-12-06 00:03:38 +00:00

Ignore 0-byte chunks passed in by the chunk reader.

The fixed-size chunk reader may create 0-byte chunks from empty files.  This
may cause validation errors when preparing the snapshot file as the last step
of a backup.
This commit is contained in:
Gilbert Chen
2020-06-08 10:53:01 -04:00
parent fe854d469d
commit 09e3cdfebf

View File

@@ -520,6 +520,11 @@ func (manager *BackupManager) Backup(top string, quickMode bool, threads int, ta
chunkID := chunk.GetID()
chunkSize := chunk.GetLength()
if chunkSize == 0 {
LOG_DEBUG("CHUNK_EMPTY", "Ignored chunk %s of size 0", chunkID)
return
}
chunkIndex++
_, found := chunkCache[chunkID]