aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/tag.pm
diff options
context:
space:
mode:
authorDavid Riebenbauer <davrieb@liegesta.at>2010-02-03 04:29:10 +0100
committerDavid Riebenbauer <davrieb@liegesta.at>2010-04-03 22:20:48 +0200
commita358d74bef51dae31332ff27e897fe04834571e6 (patch)
tree23689fa3652c6b096689fb0572174494e3176a89 /IkiWiki/Plugin/tag.pm
parentda5d29f95f6e693e8c14be1b896cf25cf4fdb3c0 (diff)
downloadikiwiki-a358d74bef51dae31332ff27e897fe04834571e6.tar
ikiwiki-a358d74bef51dae31332ff27e897fe04834571e6.tar.gz
Check for existence off srcfile in add_autofile
add_autofile has to have checks, whether to create the file, anyway, so this will make things more consistent. Correcter check for the result of verify_src_file(). Cosmetic rename of a variable $addfile to $autofile.
Diffstat (limited to 'IkiWiki/Plugin/tag.pm')
-rw-r--r--IkiWiki/Plugin/tag.pm5
1 files changed, 2 insertions, 3 deletions
diff --git a/IkiWiki/Plugin/tag.pm b/IkiWiki/Plugin/tag.pm
index c0b7feb23..c6c99ae45 100644
--- a/IkiWiki/Plugin/tag.pm
+++ b/IkiWiki/Plugin/tag.pm
@@ -71,15 +71,14 @@ sub gentag ($) {
if (defined $config{tag_autocreate} && $config{tag_autocreate}) {
my $tagfile = newpagefile(tagpage($tag), $config{default_pageext});
$tagfile=~s/^\///;
- return if (srcfile($tagfile,1));
+
+ return if (! add_autofile($tagfile));
debug(sprintf(gettext("creating tag page %s"), $tag));
my $template=template("autotag.tmpl");
$template->param(tag => $tag);
writefile($tagfile, $config{srcdir}, $template->output);
-
- add_autofile("$config{srcdir}/$tagfile");
}
}