Skip to content

Commit

Permalink
Item14237: Stability improvements.
Browse files Browse the repository at this point in the history
  • Loading branch information
vrurg committed May 26, 2017
1 parent e9c905e commit 1d26d3c
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions core/lib/Foswiki/Config.pm
Original file line number Diff line number Diff line change
Expand Up @@ -459,10 +459,25 @@ sub getSpecParser {

$parsers->{$format} = $parser;

return unless $parser;
return undef unless $parser;
return $parser;
}

# Fetch keys default values from specs cache. Recache if necessary.
=begin TML
---++ ObjectMethod fetchDefaults( %params )
Fetch keys default values from specs cache. Refresh cache if necessary.
---+++!! Parameters
| *Param* | *Description* | *Default* |
| =data= | Hashref to store defaults into | =$app->cfg->data= |
| =onlyMain= | Bool, fetch only the main spec file defaults (normally – =Foswiki.spec=) | _false_ |
See =Foswiki::Config::Spec::CacheFile=, =Foswiki::Config::Spec::File=.
=cut
sub fetchDefaults {
my $this = shift;
my %params = @_;
Expand Down Expand Up @@ -752,6 +767,7 @@ pluggable read => sub {
foreach my $dirKey (
qw(PubDir DataDir ToolsDir ScriptDir TemplateDir LocalesDir WorkingDir))
{
next unless defined $data->{$dirKey};
my ( $v, $d, $f ) = File::Spec->splitpath( $data->{$dirKey} );
my @d = File::Spec->splitdir($d);
$data->{$dirKey} =
Expand Down

0 comments on commit 1d26d3c

Please sign in to comment.