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.
- my $addfile=shift;
- my ($file,$page) = verify_src_file($addfile,$config{srcdir});
- if ($page) {
+ my $autofile=shift;
+
+ if (srcfile($autofile, 1)) {
+ return 0;
+ }
+
+ my ($file, $page) = verify_src_file("$config{srcdir}/$autofile", $config{srcdir});
+ if (defined $file) {
push @autofiles, $file;
}
}
push @autofiles, $file;
}
}
if (defined $config{tag_autocreate} && $config{tag_autocreate}) {
my $tagfile = newpagefile(tagpage($tag), $config{default_pageext});
$tagfile=~s/^\///;
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);
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");