提交 46b059d7 编写于 作者: J Junio C Hamano

gitweb: fix use of uninitialized value.

Signed-off-by: NJunio C Hamano <junkio@cox.net>
上级 b77aeb24
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册