diff options
Diffstat (limited to 'ikiwiki-comment.in')
-rwxr-xr-x | ikiwiki-comment.in | 4 |
1 files changed, 3 insertions, 1 deletions
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); |