summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordgaudet <dgaudet@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2006-01-20 16:24:24 +0000
committerdgaudet <dgaudet@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2006-01-20 16:24:24 +0000
commit7d7ade204caf2e31ee6db5dc28299e64438ca49b (patch)
tree0d643b828b4fcf19fbdea539e0f8992c2290101f
parent0ab7cdf3da5b1bc3f2e3027b05018ae0670375b7 (diff)
downloadrdiff-backup-7d7ade204caf2e31ee6db5dc28299e64438ca49b.tar.gz
in a directory with 40 increments when i specified "--remove-older-than 41B"
i got a traceback... 40B and 42B were fine. looks like a simple off-by-1. git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@750 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
-rw-r--r--rdiff-backup/CHANGELOG2
-rw-r--r--rdiff-backup/rdiff_backup/Time.py2
2 files changed, 3 insertions, 1 deletions
diff --git a/rdiff-backup/CHANGELOG b/rdiff-backup/CHANGELOG
index c37bab5..9c740d2 100644
--- a/rdiff-backup/CHANGELOG
+++ b/rdiff-backup/CHANGELOG
@@ -8,6 +8,8 @@ were used. Bug reported by Toni Price.
A few minor changes to help rdiff-backup back up to an SMB/CIFS share.
Thanks to Cengiz Gunay for testing.
+Fix an off-by-1 error in the "--remove-older-than nB" time specification.
+
New in v1.1.5 (2006/01/01)
--------------------------
diff --git a/rdiff-backup/rdiff_backup/Time.py b/rdiff-backup/rdiff_backup/Time.py
index b096510..6481a58 100644
--- a/rdiff-backup/rdiff_backup/Time.py
+++ b/rdiff-backup/rdiff_backup/Time.py
@@ -187,7 +187,7 @@ def time_from_session(session_num, rp = None):
session_times = Globals.rbdir.conn.restore.MirrorStruct \
.get_increment_times()
session_times.sort()
- if len(session_times) < session_num:
+ if len(session_times) <= session_num:
return session_times[0] # Use oldest if two few backups
return session_times[-session_num-1]