Skip to content

Commit

Permalink
Merge pull request #19 from bixycler/Item14530
Browse files Browse the repository at this point in the history
Item14530: Fix Query.pm to show correct "File System Paths"
  • Loading branch information
gac410 committed Dec 8, 2017
2 parents 2861314 + 496c556 commit 2cf7b18
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
11 changes: 7 additions & 4 deletions core/lib/Foswiki/Configure/Bootstrap.pm
Expand Up @@ -108,7 +108,10 @@ sub setBootstrap {

$Foswiki::cfg{isBOOTSTRAPPING} = 1;
push( @{ $Foswiki::cfg{BOOTSTRAP} }, @BOOTSTRAP );
push( @{ $Foswiki::cfg{BOOTSTRAP} }, keys %{ $Foswiki::cfg{BSDIRS} } );
push(
@{ $Foswiki::cfg{BOOTSTRAP} },
keys %{ $Foswiki::cfg{BOOTSTRAPDIRS} }
);
}

=begin TML
Expand Down Expand Up @@ -269,9 +272,9 @@ EPITAPH

# (At the moment of writing this line,)
# the line above is the **last expansion of $Foswiki::cfg**
$Foswiki::cfg{BSDIRS} = \%bsdirs;
print STDERR "AUTOCONFIG BSDIRS: "
. Data::Dumper->Dump( [ $Foswiki::cfg{BSDIRS} ] )
$Foswiki::cfg{BOOTSTRAPDIRS} = \%bsdirs;
print STDERR "AUTOCONFIG BOOTSTRAPDIRS: "
. Data::Dumper->Dump( [ $Foswiki::cfg{BOOTSTRAPDIRS} ] )
if (TRAUTO);

# Detect the OS and DetailedOS
Expand Down
8 changes: 7 additions & 1 deletion core/lib/Foswiki/Configure/Query.pm
Expand Up @@ -244,8 +244,14 @@ sub getspec {

# If we're bootstrapping, retain the values calculated in
# the bootstrap process. They are almost certainly wrong,
# but are a better starting point that the .spec defaults.
# but are a better starting point than the .spec defaults.
%Foswiki::cfg = %$upper_cfg;

# Reset all bootstrap subdirs to be relative to RootDir
foreach my $bsdir ( keys $Foswiki::cfg{BOOTSTRAPDIRS} ) {
eval
"\$Foswiki::cfg$bsdir = \$Foswiki::cfg{BOOTSTRAPDIRS}->{'$bsdir'}";
}
}
Foswiki::Configure::Load::readConfig( 1, 1 );

Expand Down
8 changes: 4 additions & 4 deletions core/lib/Foswiki/Configure/Wizards/Save.pm
Expand Up @@ -225,11 +225,11 @@ sub save {
ASSERT( !$@, $@ ) if DEBUG;
}
delete $Foswiki::cfg{BOOTSTRAP};
print STDERR "BSDIRS set = "
. Data::Dumper->Dump( [ $Foswiki::cfg{BSDIRS} ] )
print STDERR "BOOTSTRAPDIRS set = "
. Data::Dumper->Dump( [ $Foswiki::cfg{BOOTSTRAPDIRS} ] )
if TRACE_SAVE;
%set = ( %set, %{ $Foswiki::cfg{BSDIRS} } );
delete $Foswiki::cfg{BSDIRS};
%set = ( %set, %{ $Foswiki::cfg{BOOTSTRAPDIRS} } );
delete $Foswiki::cfg{BOOTSTRAPDIRS};

%Foswiki::cfg = ();

Expand Down

0 comments on commit 2cf7b18

Please sign in to comment.