gitweb: fix use of uninitialized value.

Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Junio C Hamano 2006-07-31 19:24:37 -07:00
parent b77aeb249a
commit 46b059d718

View File

@ -779,9 +779,11 @@ sub mimetype_guess_file {
open(MIME, $mimemap) or return undef;
while (<MIME>) {
my ($mime, $exts) = split(/\t+/);
my @exts = split(/\s+/, $exts);
foreach my $ext (@exts) {
$mimemap{$ext} = $mime;
if (defined $exts) {
my @exts = split(/\s+/, $exts);
foreach my $ext (@exts) {
$mimemap{$ext} = $mime;
}
}
}
close(MIME);