- various fixes to configure.pl and lib/BackupPC/Lib.pm
[BackupPC.git] / bin / BackupPC_tarPCCopy
index efb96a8..f2d96b1 100755 (executable)
@@ -36,7 +36,7 @@
 #
 #========================================================================
 #
-# Version 2.1.0, released 20 Jun 2004.
+# Version 3.0.0alpha, released 23 Jan 2006.
 #
 # See http://backuppc.sourceforge.net.
 #
@@ -460,11 +460,12 @@ sub TarWriteFile
                 }
                 $f->close();
                 my $md5 = Digest::MD5->new;
+                my $len = length($dataMD5);
+                $hdr->{realSize} = $len if ( $hdr->{type} != BPC_FTYPE_FILE );
                 if ( $hdr->{realSize} < 1048576
                             && length($dataMD5) != $hdr->{realSize} ) {
-                    printf(STDERR "File $hdr->{fullPath} has bad size"
-                                . " (expect $hdr->{realSize}, got %d)\n",
-                                length($dataMD5));
+                    print(STDERR "File $hdr->{fullPath} has bad size"
+                                . " (expect $hdr->{realSize}, got $len)\n");
                 } else {
                     my $digest = $bpc->Buffer2MD5($md5, $hdr->{realSize},
                                                   \$dataMD5);