aboutsummaryrefslogtreecommitdiff
path: root/handlers
diff options
context:
space:
mode:
Diffstat (limited to 'handlers')
-rw-r--r--handlers/dup.in9
-rw-r--r--handlers/rdiff.in9
2 files changed, 18 insertions, 0 deletions
diff --git a/handlers/dup.in b/handlers/dup.in
index 6e0f698..2f55b9c 100644
--- a/handlers/dup.in
+++ b/handlers/dup.in
@@ -189,26 +189,35 @@ fi
set -o noglob
# excludes
+SAVEIFS=$IFS
+IFS=$(echo -en "\n\b")
for i in $exclude; do
str="${i//__star__/*}"
execstr_source="${execstr_source} --exclude '$str'"
done
+IFS=$SAVEIFS
# includes
+SAVEIFS=$IFS
+IFS=$(echo -en "\n\b")
for i in $include; do
[ "$i" != "/" ] || fatal "Sorry, you cannot use 'include = /'"
str="${i//__star__/*}"
execstr_source="${execstr_source} --include '$str'"
done
+IFS=$SAVEIFS
# vsincludes
if [ $usevserver = yes ]; then
for vserver in $vsnames; do
+ SAVEIFS=$IFS
+ IFS=$(echo -en "\n\b")
for vi in $vsinclude; do
str="${vi//__star__/*}"
str="$VROOTDIR/$vserver$str"
execstr_source="${execstr_source} --include '$str'"
done
+ IFS=$SAVEIFS
done
fi
diff --git a/handlers/rdiff.in b/handlers/rdiff.in
index 45d5096..98a53a3 100644
--- a/handlers/rdiff.in
+++ b/handlers/rdiff.in
@@ -209,20 +209,28 @@ symlinks_warning="Maybe you have mixed symlinks and '*' in this statement, which
# TODO: order the includes and excludes
# excludes
+SAVEIFS=$IFS
+IFS=$(echo -en "\n\b")
for i in $exclude; do
str="${i//__star__/*}"
execstr="${execstr}--exclude '$str' "
done
+IFS=$SAVEIFS
# includes
+SAVEIFS=$IFS
+IFS=$(echo -en "\n\b")
for i in $include; do
[ "$i" != "/" ] || fatal "Sorry, you cannot use 'include = /'"
str="${i//__star__/*}"
execstr="${execstr}--include '$str' "
done
+IFS=$SAVEIFS
# vsinclude
if [ $usevserver = yes ]; then
for vserver in $vsnames; do
+ SAVEIFS=$IFS
+ IFS=$(echo -en "\n\b")
for vi in $vsinclude; do
str="${vi//__star__/*}"
str="$VROOTDIR/$vserver$str"
@@ -232,6 +240,7 @@ if [ $usevserver = yes ]; then
warning "vsinclude statement '${vi//__star__/*}' will be ignored for VServer $vserver. $symlinks_warning"
fi
done
+ IFS=$SAVEIFS
done
fi