Skip to content

Commit

Permalink
find_psl_file: fix duplicate share in path
Browse files Browse the repository at this point in the history
fixes #231
  • Loading branch information
msimerson committed Mar 21, 2024
1 parent ac6d3ad commit d11201d
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions lib/Mail/DMARC/Base.pm
Original file line number Diff line number Diff line change
Expand Up @@ -194,14 +194,13 @@ sub find_psl_file {
print "using $file for Public Suffix List\n" if $self->verbose;
return $file;
}
my $path;
foreach $path ($self->get_prefix('share/' . $file)) { ## no critic
last if ( -f $path && -r $path );

foreach my $path ($self->get_prefix($file)) {
if ( -f $path && -r $path ) {
print "using $path for Public Suffix List\n"; # if $self->verbose;
return $path;
}
}
if ($path && -r $path) {
print "using $path for Public Suffix List\n" if $self->verbose;
return $path;
};

# Fallback to included suffic list
return $self->get_sharefile('public_suffix_list');
Expand Down

0 comments on commit d11201d

Please sign in to comment.