summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorowsla <owsla@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2008-09-04 23:36:20 +0000
committerowsla <owsla@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2008-09-04 23:36:20 +0000
commite91387a44c73c9a8bfdbb8f150e51f29c0951f66 (patch)
treea771af8360b791a6dea3cba1f305ce4201fc5729
parent23a14de2e4b687e851bdaf662076dc8865c7e0e9 (diff)
downloadrdiff-backup-e91387a44c73c9a8bfdbb8f150e51f29c0951f66.tar.gz
Expand --exclude-if-present option to also support directories, symlinks, etc.
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@935 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
-rw-r--r--rdiff-backup/CHANGELOG2
-rw-r--r--rdiff-backup/rdiff_backup/selection.py4
2 files changed, 5 insertions, 1 deletions
diff --git a/rdiff-backup/CHANGELOG b/rdiff-backup/CHANGELOG
index 541774e..abb77a6 100644
--- a/rdiff-backup/CHANGELOG
+++ b/rdiff-backup/CHANGELOG
@@ -1,6 +1,8 @@
New in v1.2.2 (????/??/??)
---------------------------
+Adjust --exclude-if-present option to support directories, symlinks, device
+files, etc. Closes bug #24192. Thanks to Vadim Zeitlin for the suggestion.
New in v1.2.1 (2008/08/24)
diff --git a/rdiff-backup/rdiff_backup/selection.py b/rdiff-backup/rdiff_backup/selection.py
index e9476ac..b2975ee 100644
--- a/rdiff-backup/rdiff_backup/selection.py
+++ b/rdiff-backup/rdiff_backup/selection.py
@@ -478,7 +478,9 @@ probably isn't what you meant.""" %
assert include == 0 or include == 1
def sel_func(rp):
- if rp.isdir() and rp.readable() and rp.append(presence_filename).isreg(): return include
+ if rp.isdir() and rp.readable() and \
+ rp.append(presence_filename).lstat():
+ return include
return None
sel_func.exclude = not include