added MIN_TAR_SIZE cludge as variable
[BackupPC.git] / 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