X-Git-Url: http://git.rot13.org/?p=BackupPC.git;a=blobdiff_plain;f=lib%2FBackupPC%2FXfer%2FRsync.pm;h=09b81d21adff93c9531b4e4e2c5d442498980403;hp=d3358c972d6a718c56b8210da2d026694c769158;hb=2a19fd178108b0898e79d2b8908236429ca4c6a3;hpb=1a2fa2c2a1e0db12dc788216d9f3ba73301a131f diff --git a/lib/BackupPC/Xfer/Rsync.pm b/lib/BackupPC/Xfer/Rsync.pm index d3358c9..09b81d2 100644 --- a/lib/BackupPC/Xfer/Rsync.pm +++ b/lib/BackupPC/Xfer/Rsync.pm @@ -29,7 +29,7 @@ # #======================================================================== # -# Version 2.1.0beta2, released 9 May 2004. +# Version 2.1.3, released 21 Jan 2007. # # See http://backuppc.sourceforge.net. # @@ -55,9 +55,10 @@ BEGIN { # # Note: also update configure.pl when this version number is changed! # - if ( $File::RsyncP::VERSION < 0.51 ) { + if ( $File::RsyncP::VERSION < 0.52 ) { $RsyncLibOK = 0; - $RsyncLibErr = "File::RsyncP module version too old: need 0.50"; + $RsyncLibErr = "File::RsyncP module version" + . " ($File::RsyncP::VERSION) too old: need 0.52"; } else { $RsyncLibOK = 1; } @@ -141,24 +142,11 @@ sub start } else { # # Turn $conf->{BackupFilesOnly} and $conf->{BackupFilesExclude} - # into a hash of arrays of files. + # into a hash of arrays of files, and $conf->{RsyncShareName} + # to an array # - $conf->{RsyncShareName} = [ $conf->{RsyncShareName} ] - unless ref($conf->{RsyncShareName}) eq "ARRAY"; - foreach my $param qw(BackupFilesOnly BackupFilesExclude) { - next if ( !defined($conf->{$param}) ); - if ( ref($conf->{$param}) eq "ARRAY" ) { - $conf->{$param} = { - $conf->{RsyncShareName}[0] => $conf->{$param} - }; - } elsif ( ref($conf->{$param}) eq "HASH" ) { - # do nothing - } else { - $conf->{$param} = { - $conf->{RsyncShareName}[0] => [ $conf->{$param} ] - }; - } - } + $bpc->backupFileConfFix($conf, "RsyncShareName"); + if ( defined($conf->{BackupFilesOnly}{$t->{shareName}}) ) { my(@inc, @exc, %incDone, %excDone); foreach my $file ( @{$conf->{BackupFilesOnly}{$t->{shareName}}} ) {