* Fixed encoding of email subject header in bin/BackupPC_sendEmail as
[BackupPC.git] / lib / BackupPC / Xfer / RsyncFileIO.pm
index fd2df3b..16f5fbb 100644 (file)
@@ -8,11 +8,11 @@
 #   Craig Barratt  <cbarratt@users.sourceforge.net>
 #
 # COPYRIGHT
-#   Copyright (C) 2002-2003  Craig Barratt
+#   Copyright (C) 2002-2007  Craig Barratt
 #
 #========================================================================
 #
-# Version 3.1.0beta0, released 3 Sep 2007.
+# Version 3.2.0, released 31 Dec 2008.
 #
 # See http://backuppc.sourceforge.net.
 #
@@ -162,6 +162,12 @@ sub csumStart
                                      $defBlkSize, $fio->{checksumSeed},
                                      0, $attr->{compress}, 0,
                                      $fio->{protocol_version});
+        if ( $err ) {
+            $fio->log("Can't get rsync digests from $attr->{fullPath}"
+                    . " (err=$err, name=$f->{name})");
+            $fio->{stats}{errorCnt}++;
+            return -1;
+        }
         my($isCached, $isInvalid) = $d->isCached;
         if ( $fio->{logLevel} >= 5 ) {
             $fio->log("$attr->{fullPath} verify; cached = $isCached,"
@@ -1155,11 +1161,11 @@ sub fileDeltaRxDone
             if ( $phase > 0 ) {
                 $fio->log("$name: fatal error: md4 doesn't match on retry;"
                         . " file removed");
+                $fio->{stats}{errorCnt}++;
             } else {
                 $fio->log("$name: md4 doesn't match: will retry in phase 1;"
                         . " file removed");
             }
-            $fio->{stats}{errorCnt}++;
             if ( defined($fio->{rxOutFd}) ) {
                 $fio->{rxOutFd}->close;
                 unlink($fio->{rxOutFile});