From: Victor Wagner Date: Sun, 3 Oct 2010 17:58:58 +0000 (+0000) Subject: Support for uppercase extensions. X-Git-Url: http://wagner.pp.ru/gitweb/?a=commitdiff_plain;h=84c8fd40e7ca912e16f18a29b8475c1579c04b4b;p=oss%2Fimgwww.git Support for uppercase extensions. Added permission fix for files --- diff --git a/imagedir b/imagedir index b118882..9d66c09 100755 --- a/imagedir +++ b/imagedir @@ -64,8 +64,10 @@ open OUT,">index.html"; print OUT "$dir\n\n

$dir

\n" ."

back

". "\n"; -my @piclist=(<*.jpg>,<*.gif>,<*.png>) ; -print STDERR "@piclist\n"; +my @piclist=grep (/\.(jpe?g|png|tiff?|gif)$/i, <*>) ; +my @movielist= grep(/\.(mp4|avi|flv|mpg)$/i,<*>); +print STDERR "Pictures found @piclist\n"; +print STDERR "Videos found @movielist\n"; my ($prev,$next); for ($j=0;$j<=$#piclist;$j++) { $_ = $piclist[$j]; @@ -76,6 +78,7 @@ for ($j=0;$j<=$#piclist;$j++) { $next = undef; } print STDERR "$j:$_"; + chmod 0644, $_; my $info = image_info($_); my $thumbname=rescale($_,THUMBDIR,THUMBSIZE,$info); my $inlinename=rescale($_,INLINEDIR,INLINESIZE,$info);