From febf5eea480a20efb664520a867714e484eb2772 Mon Sep 17 00:00:00 2001 From: owsla Date: Sat, 31 Jan 2009 18:27:37 +0000 Subject: Change --min-file-size and --max-file-size to agree with man page. git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@1019 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109 --- rdiff-backup/CHANGELOG | 4 ++++ rdiff-backup/rdiff_backup/selection.py | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/rdiff-backup/CHANGELOG b/rdiff-backup/CHANGELOG index 559aa80..04ccdb6 100644 --- a/rdiff-backup/CHANGELOG +++ b/rdiff-backup/CHANGELOG @@ -1,6 +1,10 @@ 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) diff --git a/rdiff-backup/rdiff_backup/selection.py b/rdiff-backup/rdiff_backup/selection.py index b2975ee..ae5dfb2 100644 --- a/rdiff-backup/rdiff_backup/selection.py +++ b/rdiff-backup/rdiff_backup/selection.py @@ -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 -- cgit v1.2.1