X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/82a4fb49aea0d2adca3db1a65ac086d01c21df6f..5c30886dbf38689668a47414283f8dc4e895ec7d:/ikiwiki-comment.in diff --git a/ikiwiki-comment.in b/ikiwiki-comment.in index ef2751eca..b0cea4a4a 100755 --- a/ikiwiki-comment.in +++ b/ikiwiki-comment.in @@ -14,7 +14,9 @@ my $pagefile=shift || usage (); my $dir=IkiWiki::dirname($pagefile); $dir="." unless length $dir; my $page=IkiWiki::basename($pagefile); -$page=~s/\.[^.]+$//; +if (! -d $pagefile) { + $page=~s/\.[^.]+$//; +} IkiWiki::Plugin::comments::checkconfig(); my $comment_num=1 + IkiWiki::Plugin::comments::num_comments($page, $dir);