If you include= or exclude= a directory that is actually a symlink
authormicah <micah@758a04ac-41e6-0310-8a23-8373a73cc35d>
Sat, 11 Mar 2006 07:21:04 +0000 (07:21 +0000)
committermicah <micah@758a04ac-41e6-0310-8a23-8373a73cc35d>
Sat, 11 Mar 2006 07:21:04 +0000 (07:21 +0000)
somewhere along the chain you will only backup the symlink, and
not the data, this is fixed here in rdiff with this change

git-svn-id: http://code.autistici.org/svn/backupninja/trunk@369 758a04ac-41e6-0310-8a23-8373a73cc35d

ChangeLog
handlers/rdiff

index aec8d9741f03c379eae6b12763402959045c6038..a6fb5e51b26d63e46d3184786fb14550b87397fa 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,8 @@ version 0.9.4 -- unreleased
        mysql:
         . Fixed improper use of $vuserhome (Debian: #351083)
         . Fixed erroneous removal of tmpfile when it didn't exit
+       rdiff:
+        . Fixed improper include/exclude symlink dereference
     lib changes
        vserver:
         . init_vservers: fixed Debian bug #351083 (improper readlink syntax)
index 4871d4e17d91102ea40c6f3e323eeb3d75ae6d86..6cbe6faf48ba8cc3a9a2687ede8931185a30af93 100644 (file)
@@ -174,12 +174,14 @@ set -o noglob
 # TODO: order the includes and excludes
 # excludes
 for i in $exclude; do
+       i=`readlink -f $i`
        str="${i//__star__/*}"
        execstr="${execstr}--exclude '$str' "
 done
 # includes 
 for i in $include; do
        [ "$i" != "/" ] || fatal "Sorry, you cannot use 'include = /'"
+       i=`readlink -f $i`
        str="${i//__star__/*}"
        execstr="${execstr}--include '$str' "
 done
@@ -188,7 +190,8 @@ done
 if [ $usevserver = yes ]; then
    for vserver in $vsnames; do
       for vi in $vsinclude; do
-        str="${vi//__star__/*}"
+        i=`readlink -f $VROOTDIR/$vserver$vi`
+        str="${i//__star__/*}"
         execstr="${execstr}--include '$VROOTDIR/$vserver$str' "
       done
    done