]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/attachment.pm
improve error message if virus checker fails w/o output
[ikiwiki.git] / IkiWiki / Plugin / attachment.pm
index ef6d79a9c52a1db7006d223730a1636c6ab71bf6..01d0d24784316b7302beee90f5df4d9580a5575d 100644 (file)
@@ -386,6 +386,9 @@ sub match_virusfree ($$;@) { #{{{
        waitpid $pid, 0;
        $SIG{PIPE}="DEFAULT";
        if ($sigpipe || $?) {
+               if (! length $reason) {
+                       $reason="virus checker $IkiWiki::config{virus_checker}; failed with no output";
+               }
                return IkiWiki::FailReason->new("file seems to contain a virus ($reason)");
        }
        else {