Skip to content
Snippets Groups Projects
Commit c37a6094 authored by Matthew Smith's avatar Matthew Smith
Browse files

Update handlers/rdiff.in

parent 1a887b83
No related tags found
No related merge requests found
......@@ -399,12 +399,12 @@ done
# Assume all includes are empty
areincludesempty=true
for i in $include; do
[ "$i" != "/" ] || fatal "Sorry, you cannot use 'include = /'"
[ "$i" != "/" ] || fatal "Sorry, you cannot use 'include = /'"
# Escape spaces (backslashes should not have been in first place...)
str="${i// /\\\ }"
# Set not empty if any have files or directories
ls "${str}/*" > 2&>1 /dev/null ; [ $? -eq 0 ] && areincludesempty=false
execstr="${execstr}--include '$str' "
find "${str}/" -mindepth 1 -print -quit | grep -q . && areincludesempty=false
execstr="${execstr}--include '$str' "
done
# Don't backup a source that includes no files or folders
[ $areincludesempty = true ] && fatal "Source includes contain no files or folders, aborting backup"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment