mirror of
https://github.com/gilbertchen/duplicacy
synced 2025-12-06 00:03:38 +00:00
Fix another chunk leak in listing files in a revision.
This bug leaks a chunk every time files in a revision are listed. Not a big deal for backup and restore, but it becomes problematic when listing files in many revisions for commands such check and history.
This commit is contained in:
@@ -120,6 +120,12 @@ func (snapshot *Snapshot)ListRemoteFiles(config *Config, chunkOperator *ChunkOpe
|
|||||||
return chunk.GetBytes()
|
return chunk.GetBytes()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
defer func() {
|
||||||
|
if chunk != nil {
|
||||||
|
config.PutChunk(chunk)
|
||||||
|
}
|
||||||
|
} ()
|
||||||
|
|
||||||
// Normally if Version is 0 then the snapshot is created by CLI v2 but unfortunately CLI 3.0.1 does not set the
|
// Normally if Version is 0 then the snapshot is created by CLI v2 but unfortunately CLI 3.0.1 does not set the
|
||||||
// version bit correctly when copying old backups. So we need to check the first byte -- if it is '[' then it is
|
// version bit correctly when copying old backups. So we need to check the first byte -- if it is '[' then it is
|
||||||
// the old format. The new format starts with a string encoded in msgpack and the first byte can't be '['.
|
// the old format. The new format starts with a string encoded in msgpack and the first byte can't be '['.
|
||||||
|
|||||||
Reference in New Issue
Block a user