Skip to content

Commit 42aa2f3

Browse files
committed
[Issue #328] minor refactoring
1 parent be4528c commit 42aa2f3

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/delete.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -229,21 +229,21 @@ do_retention_internal(parray *backup_list, parray *to_keep_list, parray *to_purg
229229

230230
if (backup->backup_mode == BACKUP_MODE_FULL)
231231
{
232-
/* Consider only valid FULL backups for Redundancy fulfillment */
233-
if (backup->status == BACKUP_STATUS_OK ||
234-
backup->status == BACKUP_STATUS_DONE)
235-
{
236-
n_full_backups++;
237-
}
238-
239232
/* Add every FULL backup that satisfy Redundancy policy to separate list */
240-
if (n_full_backups <= instance_config.retention_redundancy)
233+
if (n_full_backups < instance_config.retention_redundancy)
241234
{
242235
if (!redundancy_full_backup_list)
243236
redundancy_full_backup_list = parray_new();
244237

245238
parray_append(redundancy_full_backup_list, backup);
246239
}
240+
241+
/* Consider only valid FULL backups for Redundancy fulfillment */
242+
if (backup->status == BACKUP_STATUS_OK ||
243+
backup->status == BACKUP_STATUS_DONE)
244+
{
245+
n_full_backups++;
246+
}
247247
}
248248
}
249249
/* Sort list of full backups to keep */

0 commit comments

Comments
 (0)