From 6348bffb3ca90327f8dd042bfd0a89802b269b79 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Wed, 4 Jun 2014 16:55:27 +0200 Subject: [PATCH] Template-Pfad aus Pfad-Namen anderer Tex-Dateien richtig entfernen. Behebt #2483. --- bin/mozilla/amtemplates.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/mozilla/amtemplates.pl b/bin/mozilla/amtemplates.pl index f8c6972e6..0622b0213 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|^$template_dir/||; # 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; -- 2.20.1