gitweb: Fix mimetype_guess_file for files with multiple extensions
Fix getting correct mimetype for "blob_plain" view for files which have multiple extensions, e.g. foo.1.html; now only the last extension is used to find mimetype. Noticed by Martin Waitz. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
c774b2dcf6
commit
8059319acc
@ -1197,7 +1197,7 @@ sub mimetype_guess_file {
|
|||||||
}
|
}
|
||||||
close(MIME);
|
close(MIME);
|
||||||
|
|
||||||
$filename =~ /\.(.*?)$/;
|
$filename =~ /\.([^.]*)$/;
|
||||||
return $mimemap{$1};
|
return $mimemap{$1};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user