X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/8abd9ce32e946691e0953f9a8e2c183183d7854e..e7a7492e:/bin/mozilla/amtemplates.pl diff --git a/bin/mozilla/amtemplates.pl b/bin/mozilla/amtemplates.pl index f8c6972e6..004563557 100644 --- a/bin/mozilla/amtemplates.pl +++ b/bin/mozilla/amtemplates.pl @@ -201,6 +201,7 @@ sub display_template_form { # if ($format eq "tex") { # search all .tex-files in template dir (recursively) + my $template_dir = $defaults->templates; my @all_files; find( sub { @@ -209,13 +210,13 @@ sub display_template_form { my $fname = $File::Find::name; # remove template dir from name - $fname =~ s|^templates/[^/+]/||; + $fname =~ s|^\Q$template_dir\E/||; # remove .tex from name $fname =~ s|.tex$||; push(@all_files, $fname); - }, $defaults->templates); + }, $template_dir); # filter all files already set up (i.e. not already in @values) my @other_files = grep { my $a=$_; not grep {$a eq $_->{value}} @values } @all_files;