From 86aed2d1f1fe9e93563929ae9f1936c158a7dfef Mon Sep 17 00:00:00 2001 From: hoth Date: Sun, 13 Feb 2022 16:06:14 +0530 Subject: [PATCH] Bugfix: Bad var name caused wrong files to be deleted in check for max items --- BackupRotator.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/BackupRotator.py b/BackupRotator.py index a811bf3..0c36800 100755 --- a/BackupRotator.py +++ b/BackupRotator.py @@ -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):