aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2014-09-15 21:08:40 +0100
committerSimon McVittie <smcv@debian.org>2014-09-15 21:08:40 +0100
commitea2ab6f885b97081c37f9034d8b7e12a0e34ad3e (patch)
treea0b46dc980c8b96bfc5b35a7691d261cde586cf9 /IkiWiki
parent303f183d45a3095859dd453339cc5565bd1b8074 (diff)
parent77a2267dcfb103b63a675e4a2226076166b29d3f (diff)
downloadikiwiki-ea2ab6f885b97081c37f9034d8b7e12a0e34ad3e.tar
ikiwiki-ea2ab6f885b97081c37f9034d8b7e12a0e34ad3e.tar.gz
Merge branch 'ready/more-magic'
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/filecheck.pm4
1 files changed, 3 insertions, 1 deletions
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) {