1 This patch adds function bestdir() which returns best directory from the directory structure. This is in addition to the bestlink() function which is there in IkiWiki.pm
4 ===================================================================
5 --- IkiWiki.pm (revision 9)
6 +++ IkiWiki.pm (working copy)
11 +sub bestdir ($$) { #{{{
16 + if ($link=~s/^\/+//) {
22 + $l.="/" if length $l;
24 + if (-d "$config{srcdir}/$l") {
27 + } while $cwd=~s!/?[^/]+$!!;
29 + if (length $config{userdir}) {
30 + my $l = "$config{userdir}/".lc($link);
40 sub isinlinableimage ($) { #{{{