Skip to content

Commit

Permalink
fix kpse_cache corner cases
Browse files Browse the repository at this point in the history
  • Loading branch information
brucemiller committed Apr 25, 2024
1 parent 4389077 commit e8380dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/LaTeXML/Util/Pathname.pm
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ sub build_kpse_cache {
foreach my $path (split(/$KPATHSEP/, $texpaths)) {
$path =~ s/^!!//; $path =~ s|//+$|/|;
push(@filters, $path) if -d $path; }
my $filterre = '(?:' . join('|', map { "\Q$_\E"; } @filters) . ')';
my $filterre = scalar(@filters) && '(?:' . join('|', map { "\Q$_\E"; } @filters) . ')';
$texmf =~ s/^["']//; $texmf =~ s/["']$//;
$texmf =~ s/^\s*\\\{(.+?)}\s*$/$1/s;
$texmf =~ s/\{\}//g;
Expand All @@ -453,7 +453,7 @@ sub build_kpse_cache {
$subdir = $1;
$subdir =~ s|^\./||; # remove prefix
my $d = $dir . '/' . $subdir; # Hopefully OS safe, for comparison?
$skip = $d !~ /$filterre/;
$skip = $d !~ /$filterre/ if $filterre;
$skip |= ($d =~ m|-dev[$//]|) unless $LaTeXML::DEBUG{'latex-dev'};
}
elsif (!$skip) {
Expand Down

0 comments on commit e8380dd

Please sign in to comment.