/[BackupPC]/trunk/lib/BackupPC/SearchLib.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/lib/BackupPC/SearchLib.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 253 by dpavlin, Mon Dec 12 13:41:08 2005 UTC revision 254 by dpavlin, Mon Dec 12 16:07:27 2005 UTC
# Line 381  sub get_tgz_size_by_name($) { Line 381  sub get_tgz_size_by_name($) {
381                  $size = (stat("${tgz}.tar.gz"))[7];                  $size = (stat("${tgz}.tar.gz"))[7];
382          } elsif (-d $tgz) {          } elsif (-d $tgz) {
383                  opendir(my $dir, $tgz) || die "can't opendir $tgz: $!";                  opendir(my $dir, $tgz) || die "can't opendir $tgz: $!";
384                  my @parts = grep { !/^\./ && -f "$tgz/$_" } readdir($dir);                  my @parts = grep { !/^\./ && !/md5/ && -f "$tgz/$_" } readdir($dir);
385                  $size = 0;                  $size = 0;
386                  foreach my $part (@parts) {                  foreach my $part (@parts) {
387                          $size += (stat("$tgz/$part"))[7] || die "can't stat $tgz/$part: $!";                          $size += (stat("$tgz/$part"))[7] || die "can't stat $tgz/$part: $!";
388                  }                  }
389                  closedir $dir;                  closedir $dir;
390            } else {
391                    return -1;
392          }          }
393    
394          return $size;          return $size;

Legend:
Removed from v.253  
changed lines
  Added in v.254

  ViewVC Help
Powered by ViewVC 1.1.26