Commit c3105aed authored by owsla's avatar owsla

Expand --exclude-if-present option to also support directories, symlinks, etc.


git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup@935 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent 4b42bfad
New in v1.2.2 (????/??/??) 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) New in v1.2.1 (2008/08/24)
......
...@@ -478,7 +478,9 @@ probably isn't what you meant.""" % ...@@ -478,7 +478,9 @@ probably isn't what you meant.""" %
assert include == 0 or include == 1 assert include == 0 or include == 1
def sel_func(rp): 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 return None
sel_func.exclude = not include sel_func.exclude = not include
......
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