Bugfix: Bad var name caused wrong files to be deleted in check for max items

This commit is contained in:
hoth 2022-02-13 16:06:14 +05:30
parent effa940e69
commit 86aed2d1f1
1 changed files with 2 additions and 1 deletions

View File

@ -14,6 +14,7 @@ Released under the GNU GENERAL PUBLIC LICENSE v3 (See LICENSE file for more)
import datetime
import os
# import pprint
import shutil
import sys
import syslog
@ -185,7 +186,7 @@ class BackupRotator:
self.log("Removing items")
for child_to_purge in children_to_purge:
child_basename = os.path.basename(child_to_purge)
self._remove_item(config, item_to_purge)
self._remove_item(config, child_to_purge)
def _rotate_path_for_maximum_age(self, config, path: str, max_age_days: int):