summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--IkiWiki.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm
index c218ed8ab..c2cadd35f 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -1654,7 +1654,7 @@ sub saveindex () {
sub template_file ($) {
my $name=shift;
- my $tpage=($name =~ /^\//) ? $name : "templates/$name";
+ my $tpage=($name =~ s/^\///) ? $name : "templates/$name";
if ($name !~ /\.tmpl$/ && exists $pagesources{$tpage}) {
$tpage=$pagesources{$tpage};
$name.=".tmpl";