Commit 005251cb authored by owsla's avatar owsla

Change --min-file-size and --max-file-size to agree with man page.


git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup@1019 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent 3db18bc5
New in v1.3.2 (????/??/??)
---------------------------
Change --min-file-size and --max-file-size to agree with man page. These
options no longer include files, and will only apply to regular files. Thanks
to Johannes Jensen for the suggestion. (Andrew Ferguson)
Improve error message if regress operation fails due to Security Violation.
Thanks to Grzegorz Marszalek for the bug report. (Andrew Ferguson)
......
......@@ -531,8 +531,10 @@ probably isn't what you meant.""" %
"""Return selection function given by filesize"""
size = int(sizestr)
assert size > 0
if min_max: sel_func = lambda rp: (rp.getsize() <= size)
else: sel_func = lambda rp: (rp.getsize() >= size)
def sel_func(rp):
if not rp.isreg(): return None
if min_max: return ((rp.getsize() <= size) and None)
else: return ((rp.getsize() >= size) and None)
sel_func.exclude = 1
sel_func.name = "%s size %d" % (min_max and "Maximum" or "Minimum", size)
return sel_func
......
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