1
0
mirror of https://github.com/gilbertchen/duplicacy synced 2025-12-06 00:03:38 +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.
for _, collectionName := range collections {
if collectOnly {
continue
}
matched := collectionRegex.FindStringSubmatch(collectionName)
if matched == nil {
continue
@@ -2020,6 +2016,10 @@ func (manager *SnapshotManager) PruneSnapshots(selfID string, snapshotID string,
maxCollectionNumber = collectionNumber
}
if collectOnly {
continue
}
collectionFile := path.Join(collectionDir, collectionName)
manager.fileChunk.Reset(false)