1
0
mirror of https://github.com/gilbertchen/duplicacy synced 2025-12-14 23:33:18 +00:00

maxCollectionNumber must be increased even in collect-only mode

This fixed a bug that caused collect-only mode to keep overriding
collect 1 during every prune
This commit is contained in:
Gilbert Chen
2024-10-29 22:46:46 -04:00
parent a06d925e53
commit 6bca9fccdd

View File

@@ -2006,10 +2006,6 @@ func (manager *SnapshotManager) PruneSnapshots(selfID string, snapshotID string,
// deletable. // deletable.
for _, collectionName := range collections { for _, collectionName := range collections {
if collectOnly {
continue
}
matched := collectionRegex.FindStringSubmatch(collectionName) matched := collectionRegex.FindStringSubmatch(collectionName)
if matched == nil { if matched == nil {
continue continue
@@ -2020,6 +2016,10 @@ func (manager *SnapshotManager) PruneSnapshots(selfID string, snapshotID string,
maxCollectionNumber = collectionNumber maxCollectionNumber = collectionNumber
} }
if collectOnly {
continue
}
collectionFile := path.Join(collectionDir, collectionName) collectionFile := path.Join(collectionDir, collectionName)
manager.fileChunk.Reset(false) manager.fileChunk.Reset(false)