From: dpavlin Date: Sun, 16 Oct 2005 17:48:05 +0000 (+0000) Subject: added MIN_TAR_SIZE cludge as variable X-Git-Url: http://git.rot13.org/?a=commitdiff_plain;h=261fbc5fa5a45bc3d2db1037f5ea729f95524613;p=BackupPC.git added MIN_TAR_SIZE cludge as variable git-svn-id: svn+ssh://llin/home/dpavlin/private/svn/BackupPC/trunk@218 8392b6e1-25fa-0310-8288-cc32f8e212ea --- diff --git a/bin/BackupPC_incPartsUpdate b/bin/BackupPC_incPartsUpdate index 1a0ea17..cc37b07 100755 --- a/bin/BackupPC_incPartsUpdate +++ b/bin/BackupPC_incPartsUpdate @@ -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