summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rdiff-backup/CHANGELOG4
-rw-r--r--rdiff-backup/rdiff_backup/selection.py6
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