X-Git-Url: http://git.rot13.org/?p=BackupPC.git;a=blobdiff_plain;f=lib%2FBackupPC%2FXfer%2FRsync.pm;h=107e2e1eb073c081dcbbc5b95a645bfedde0fd06;hp=8f8093bd113a4b7d0f17fef39ae4e8c0567b3b26;hb=5729095faa3ef12dc5d4f02538c3650ac81912ef;hpb=567f78c78b11de16e73e0d6cd1f290a02b420f72 diff --git a/lib/BackupPC/Xfer/Rsync.pm b/lib/BackupPC/Xfer/Rsync.pm index 8f8093b..107e2e1 100644 --- a/lib/BackupPC/Xfer/Rsync.pm +++ b/lib/BackupPC/Xfer/Rsync.pm @@ -52,9 +52,9 @@ BEGIN { $RsyncLibOK = 0; $RsyncLibErr = "File::RsyncP module doesn't exist"; } else { - if ( $File::RsyncP::VERSION < 0.41 ) { + if ( $File::RsyncP::VERSION < 0.44 ) { $RsyncLibOK = 0; - $RsyncLibErr = "File::RsyncP module version too old: need 0.41"; + $RsyncLibErr = "File::RsyncP module version too old: need 0.44"; } else { $RsyncLibOK = 1; } @@ -176,8 +176,17 @@ sub start # To make this easier we do all the includes first and all # of the excludes at the end (hopefully they commute). # + $file =~ s{/$}{}; $file = "/$file"; $file =~ s{//+}{/}g; + if ( $file eq "/" ) { + # + # This is a special case: if the user specifies + # "/" then just include it and don't exclude "/*". + # + push(@inc, $file) if ( !$incDone{$file} ); + next; + } my $f = ""; while ( $file =~ m{^/([^/]*)(.*)} ) { my $elt = $1; @@ -215,7 +224,7 @@ sub start if ( $t->{type} eq "full" ) { $logMsg = "full backup started for directory $t->{shareName}"; } else { - $incrDate = $bpc->timeStampISO($t->{lastFull} - 3600, 1); + $incrDate = $bpc->timeStamp($t->{lastFull} - 3600, 1); $logMsg = "incr backup started back to $incrDate for directory" . " $t->{shareName}"; }