added MIN_TAR_SIZE cludge as variable
authordpavlin <dpavlin@8392b6e1-25fa-0310-8288-cc32f8e212ea>
Sun, 16 Oct 2005 17:48:05 +0000 (17:48 +0000)
committerdpavlin <dpavlin@8392b6e1-25fa-0310-8288-cc32f8e212ea>
Sun, 16 Oct 2005 17:48:05 +0000 (17:48 +0000)
git-svn-id: svn+ssh://llin/home/dpavlin/private/svn/BackupPC/trunk@218 8392b6e1-25fa-0310-8288-cc32f8e212ea

bin/BackupPC_incPartsUpdate

index 1a0ea17..cc37b07 100755 (executable)
@@ -17,6 +17,9 @@ use Archive::Tar::Streamed;
 use Algorithm::Diff;
 use Getopt::Std;
 
+# cludge: minimum .tar.gz size
+my $MIN_TAR_SIZE = 80;
+
 my $path = abs_path($0);
 $path =~ s#/[^/]+$#/#;
 my $tarIncCreate = $path .= 'BackupPC_tarIncCreate';
@@ -207,7 +210,7 @@ while (my $row = $sth->fetchrow_hashref) {
                $size = (stat( "$tar_dir/$tar_file" ))[7];
        }
 
-       if ($size > 45) {
+       if ($size > $MIN_TAR_SIZE) {
 
                my $max_size = $Conf{'MaxArchiveSize'} || die "problem with MaxArchieSize parametar";
                $max_size *= 1024;      # convert to bytes