diff options
author | owsla <owsla@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2009-01-31 18:27:37 +0000 |
---|---|---|
committer | owsla <owsla@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2009-01-31 18:27:37 +0000 |
commit | febf5eea480a20efb664520a867714e484eb2772 (patch) | |
tree | 1f879850098492e91a24d03d583d32f30f9d1010 | |
parent | ac1c7dc4c578fcd583d2ca1d6feb6caef184c30b (diff) | |
download | rdiff-backup-febf5eea480a20efb664520a867714e484eb2772.tar.gz |
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
-rw-r--r-- | rdiff-backup/CHANGELOG | 4 | ||||
-rw-r--r-- | 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 |