fixed number of changes displayed
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 23 May 2010 16:15:10 +0000 (18:15 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 23 May 2010 16:15:10 +0000 (18:15 +0200)
lib/MojoFacets/Changes.pm

index 3b94253..752b709 100644 (file)
@@ -16,7 +16,7 @@ sub index {
        foreach my $path ( sort { $b cmp $a } glob '/tmp/changes/*' ) {
                if ( $path =~ m{/((\d+\.\d+)\.data\.(.+))$} ) {
                        push @$changes, { uid => $1, t => $2, action => $3 };
-                       last if $#$changes > $max;
+                       last if $#$changes >= $max;
                } else {
                        warn "ignore: $path\n";
                }