summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-09-01 15:00:15 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-09-01 15:00:15 -0400
commitb7458c48d8a85866fdc7c074b1571e2f623acc2c (patch)
tree654f487b9af89268fa50270aa37095e1e65c9afe /IkiWiki/Plugin
parent000c87f510bee6085030e084041d595146984a26 (diff)
filecheck: Fall back to testing for binary or plain text files if no mime type is detected.
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r--IkiWiki/Plugin/filecheck.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/IkiWiki/Plugin/filecheck.pm b/IkiWiki/Plugin/filecheck.pm
index 9c7a8dbb7..27f764e3b 100644
--- a/IkiWiki/Plugin/filecheck.pm
+++ b/IkiWiki/Plugin/filecheck.pm
@@ -127,7 +127,10 @@ sub match_mimetype ($$;@) { #{{{
}
my $mimetype=File::MimeInfo::Magic::magic($file);
if (! defined $mimetype) {
- $mimetype="unknown";
+ $mimetype=File::MimeInfo::Magic::default($file);
+ if (! defined $mimetype) {
+ $mimetype="unknown";
+ }
}
my $regexp=IkiWiki::glob2re($wanted);