]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
the user might specify a directory, rather than a file, if so just put the comment...
authorJoey Hess <joey@kitenet.net>
Tue, 25 Nov 2014 19:44:34 +0000 (15:44 -0400)
committerJoey Hess <joey@kitenet.net>
Tue, 25 Nov 2014 19:44:34 +0000 (15:44 -0400)
ikiwiki-comment.in

index ef2751ecadaf537a571391965b586d9d9668387f..b0cea4a4ae03fe17d6ad7a382b097f114f89c557 100755 (executable)
@@ -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);