Skip to content

Commit

Permalink
Prefer catdir
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelhorne committed Oct 10, 2018
1 parent cbdaae9 commit 98a26b9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/Geo/Coder/Free/Display.pm
Original file line number Diff line number Diff line change
Expand Up @@ -415,15 +415,15 @@ sub _pfopen {
next unless(-d $dir);
if($suffixes) {
foreach my $suffix(split(/:/, $suffixes)) {
$self->_debug({ message => "check for file $dir/$prefix.$suffix" });
my $rc = "$dir/$prefix.$suffix";
my $rc = File::Spec->catdir($dir, "$prefix.$suffix");
$self->_debug({ message => "check for file $rc" });
if(-r $rc) {
$savedpaths->{$candidate} = $rc;
return $rc;
}
}
} elsif(-r "$dir/$prefix") {
my $rc = "$dir/$prefix";
my $rc = File::Spec->catdir($dir, $prefix);
$savedpaths->{$candidate} = $rc;
$self->_debug({ message => "using $rc" });
return $rc;
Expand Down

0 comments on commit 98a26b9

Please sign in to comment.