From 290446c3a8e9cbf6ee4f3e067b534af97623a685 Mon Sep 17 00:00:00 2001 From: "robweberjr@gmail.com" Date: Mon, 31 Mar 2014 12:37:11 -0500 Subject: [PATCH] fixed error in backup rotation --- changelog.txt | 2 ++ resources/lib/backup.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/changelog.txt b/changelog.txt index 0df5a9e..5cf53f4 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2,6 +2,8 @@ Version 0.5.2 added additional script and window parameters, thanks Samu-rai +critical error in backup rotation + Version 0.5.1 updated for new Gotham xbmc python updates diff --git a/resources/lib/backup.py b/resources/lib/backup.py index 374ce49..061fcef 100644 --- a/resources/lib/backup.py +++ b/resources/lib/backup.py @@ -390,7 +390,7 @@ class XbmcBackup: self.filesTotal = self.filesTotal + remove_num + 1 #update the progress bar if it is available - while(remove_num < total_backups and not self._checkCancel()): + while(remove_num < (len(dirs) - total_backups) and not self._checkCancel()): self._updateProgress(utils.getString(30054) + " " + dirs[remove_num][1]) utils.log("Removing backup " + dirs[remove_num][0]) self.remote_vfs.rmdir(self.remote_base_path + dirs[remove_num][0] + "/")