Commit ffd210c3 authored by dgaudet's avatar dgaudet

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@750 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent ccdebca5
...@@ -8,6 +8,8 @@ were used. Bug reported by Toni Price. ...@@ -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. A few minor changes to help rdiff-backup back up to an SMB/CIFS share.
Thanks to Cengiz Gunay for testing. 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) New in v1.1.5 (2006/01/01)
-------------------------- --------------------------
......
...@@ -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