From: Bernd Bleßmann Date: Wed, 4 Jun 2014 14:55:27 +0000 (+0200) Subject: Template-Pfad aus Pfad-Namen anderer Tex-Dateien richtig entfernen. X-Git-Tag: release-3.2.0beta~421 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=6348bffb3ca90327f8dd042bfd0a89802b269b79;p=kivitendo-erp.git Template-Pfad aus Pfad-Namen anderer Tex-Dateien richtig entfernen. Behebt #2483. --- 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;