gitweb: Skip comments in mime.types like file

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Jakub Narebski 2006-08-14 02:15:22 +02:00 committed by Junio C Hamano
parent d294e1cad4
commit 618918e541

View File

@ -858,6 +858,7 @@ sub mimetype_guess_file {
my %mimemap; my %mimemap;
open(MIME, $mimemap) or return undef; open(MIME, $mimemap) or return undef;
while (<MIME>) { while (<MIME>) {
next if m/^#/; # skip comments
my ($mime, $exts) = split(/\t+/); my ($mime, $exts) = split(/\t+/);
if (defined $exts) { if (defined $exts) {
my @exts = split(/\s+/, $exts); my @exts = split(/\s+/, $exts);