walle303 10 лет назад
Родитель
Сommit
cb78ffb8f2
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      modules/Pisg/Parser/Logfile.pm

+ 3 - 3
modules/Pisg/Parser/Logfile.pm

@@ -794,9 +794,9 @@ sub _adjusttimeoffset
 sub _read_cache
 sub _read_cache
 {
 {
     my ($self, $statsref, $linesref, $logfile) = @_;
     my ($self, $statsref, $linesref, $logfile) = @_;
-    my $csum = (split(' ', `cksum $logfile`))[0];
+    my $csum = (split(' ', `sum -s $logfile`))[0];
     my $cachefile = $logfile;
     my $cachefile = $logfile;
-    $cachefile =~ s/[^\w-]/_/g;
+    $cachefile =~ s/[^\w-]/_/go;
     $cachefile = "$self->{cfg}->{cachedir}/$cachefile";
     $cachefile = "$self->{cfg}->{cachedir}/$cachefile";
 
 
     return undef unless -e $cachefile;
     return undef unless -e $cachefile;
@@ -822,7 +822,7 @@ sub _read_cache
 sub _update_cache
 sub _update_cache
 {
 {
     my ($self, $stats, $lines, $logfile) = @_;
     my ($self, $stats, $lines, $logfile) = @_;
-    my $csum = (split(' ', `cksum $logfile`))[0];
+    my $csum = (split(' ', `sum -s $logfile`))[0];
     my $cachefile = $logfile;
     my $cachefile = $logfile;
     $cachefile =~ s/[^\w-]/_/g;
     $cachefile =~ s/[^\w-]/_/g;
     $cachefile = "$self->{cfg}->{cachedir}/$cachefile";
     $cachefile = "$self->{cfg}->{cachedir}/$cachefile";