]> scripts.mit.edu Git - www/ikiwiki.git/blobdiff - doc/bugs/filecheck_failing_to_find_files.mdwn
filecheck: Fix bug that prevented the pagespecs from matching when not called by...
[www/ikiwiki.git] / doc / bugs / filecheck_failing_to_find_files.mdwn
index 49de3d435511a95b8c8f10877447d8ca3dcd3463..e896f2129d603e88b9667136d14ac1c1e4914962 100644 (file)
@@ -2,6 +2,19 @@ Using the attachment plugin, when filecheck was checking the mime-type of the at
 
 It turns out that the filecheck plugin couldn't find the file, because it was merely using the $pagesources hash, rather than finding the absolute path of the file in question.
 
+> I don't understand why the file was not in `%pagesources`. Do you?
+> --[[Joey]]
+
+>> The file *was* in `%pagesources`, but what returns from that is the filename relative to the `srcdir` directory; for example, `foo/bar.gif`.
+>> When File::MimeInfo::Magic::magic is given that, it can't find the file.
+>> But if it is given `/path/to/srcdir/foo/bar.gif` instead, then it *can* find the file, and returns the mime-type correctly.
+>> --[[KathrynAndersen]]
+
+>>> Ok, so it's not removal specific, can in fact be triggered by using
+>>> testpagespec (or really anything besides attachment, which passes
+>>> the filename parameter). Nor is it limited to mimetype, all the tests in 
+>>> filecheck have the problem. [[Fixed|done]] --[[Joey]] 
+
 The following patch fixes the problem:
 
        diff --git a/IkiWiki/Plugin/filecheck.pm b/IkiWiki/Plugin/filecheck.pm