plugin => {
safe => 1,
rebuild => undef,
- section => "misc",
},
}
my $mimeinfo_ok=! $@;
my $mimetype;
if ($mimeinfo_ok) {
- my $mimetype=File::MimeInfo::Magic::magic($file);
+ $mimetype=File::MimeInfo::Magic::magic($file);
}
# Fall back to using file, which has a more complete
}
my $regexp=IkiWiki::glob2re($wanted);
- if ($mimetype!~/^$regexp$/i) {
+ if ($mimetype!~$regexp) {
return IkiWiki::FailReason->new("file MIME type is $mimetype, not $wanted");
}
else {