X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/8a8e54f3f61721b40c60712c4c5c0cefd049502e..3676ab329d40de55fa11b4862cc3fb5350ceedb3:/IkiWiki/Plugin/filecheck.pm diff --git a/IkiWiki/Plugin/filecheck.pm b/IkiWiki/Plugin/filecheck.pm index cdea5c706..6e6528398 100644 --- a/IkiWiki/Plugin/filecheck.pm +++ b/IkiWiki/Plugin/filecheck.pm @@ -150,7 +150,7 @@ sub match_mimetype ($$;@) { chomp $mimetype; close $file_h; } - if (! defined $mimetype || $mimetype !~s /;.*//) { + if (! defined $mimetype) { # Fall back to default value. $mimetype=File::MimeInfo::Magic::default($file) if $mimeinfo_ok; @@ -158,6 +158,8 @@ sub match_mimetype ($$;@) { $mimetype="unknown"; } } + # Ignore any parameters, we only want the type itself + $mimetype =~ s/;.*//; my $regexp=IkiWiki::glob2re($wanted); if ($mimetype!~$regexp) {