the user might specify a directory, rather than a file, if so just put the comment in the directory
parent
509370d91d
commit
eb7baeb196
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue