mirror of
https://github.com/git/git.git
synced 2024-11-24 10:26:17 +08:00
gitweb: fix use of uninitialized value.
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
b77aeb249a
commit
46b059d718
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user