From 1bffaf2e2dee1913a3daf9b11ed645343eb7921a Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Sun, 24 Jun 2012 01:18:45 +0200 Subject: [PATCH] show git scans --- plack/lib/Plack/App/BookReader.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plack/lib/Plack/App/BookReader.pm b/plack/lib/Plack/App/BookReader.pm index f3f26f3..9731530 100644 --- a/plack/lib/Plack/App/BookReader.pm +++ b/plack/lib/Plack/App/BookReader.pm @@ -237,7 +237,7 @@ sub serve_path { warn "# reduce $reduce $path\n"; my $cache_path = "cache/$path.reduce.$reduce.jpg"; - if ( $reduce <= 1 ) { + if ( $reduce <= 1 && $path =~ m/\.jpe?g$/ ) { $cache_path = $path; } elsif ( ! -e $cache_path ) { my $image = Graphics::Magick->new( magick => 'jpg' ); @@ -277,7 +277,7 @@ sub serve_path { my @page_files; for my $basename (sort { $a cmp $b } @children) { - push @page_files, $basename if $basename =~ m/\.jpg$/; + push @page_files, $basename if $basename =~ m/\.(jpg|gif)$/; my $file = "$path/$basename"; my $url = $dir_url . $basename; -- 2.20.1