aboutsummaryrefslogtreecommitdiff
path: root/handlers/rdiff.in
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2010-01-09 00:44:43 +0100
committerintrigeri <intrigeri@boum.org>2010-01-09 00:44:43 +0100
commit4e0519e390137b18b545f0ad256d03941cdd7bac (patch)
tree585e7fec41eb22995603b293a893c1a77a69f0af /handlers/rdiff.in
parent47313bca65de105145f2168538b294a9bcc0e98d (diff)
downloadbackupninja-4e0519e390137b18b545f0ad256d03941cdd7bac.tar.gz
backupninja-4e0519e390137b18b545f0ad256d03941cdd7bac.tar.bz2
rdiff,dup: fix include/exclude paths with spaces (Closes: #398435)
This also fixes Redmine bug #1021.
Diffstat (limited to 'handlers/rdiff.in')
-rw-r--r--handlers/rdiff.in9
1 files changed, 9 insertions, 0 deletions
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