Commit af39d809 authored by dgaudet's avatar dgaudet

fix off-by-1 traceback in "--remove-older-than nB"


git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup@751 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent ffd210c3
New in v1.0.5 (????/??/??)
--------------------------
Fix a traceback due to an off-by-1 error in "--remove-older-than nB".
New in v1.0.4 (2006/01/15) New in v1.0.4 (2006/01/15)
-------------------------- --------------------------
......
...@@ -187,7 +187,7 @@ def time_from_session(session_num, rp = None): ...@@ -187,7 +187,7 @@ def time_from_session(session_num, rp = None):
session_times = Globals.rbdir.conn.restore.MirrorStruct \ session_times = Globals.rbdir.conn.restore.MirrorStruct \
.get_increment_times() .get_increment_times()
session_times.sort() 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[0] # Use oldest if two few backups
return session_times[-session_num-1] return session_times[-session_num-1]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment