Skip to content

Commit

Permalink
Item10069: Make sure a /pub directory is guessed. It's missing for
Browse files Browse the repository at this point in the history
sites using shortest urls.   Also give better information about why
directories are missing with a relocated bin directory.

git-svn-id: http://svn.foswiki.org/branches/Release01x01@10091 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
GeorgeClark authored and GeorgeClark committed Nov 28, 2010
1 parent 59f1ad3 commit 49b04ac
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions core/lib/Foswiki/Configure/Checkers/PubDir.pm
Expand Up @@ -14,6 +14,15 @@ sub check {
$this->{fileErrors} = 0;
$this->{excessPerms} = 0;
my $e = $this->guessMajorDir( 'PubDir', 'pub' );

$e .= $this->NOTE(<<MISSING
If PubDir is missing, your ScriptDir is probably not located in the Foswiki
installation directory. All directory locations are guessed relative to the
ScriptDir location. (<code>$Foswiki::cfg{ScriptDir}</code>) Carefully review all of the Directory settings, especially
the WorkingDir, which will be created in the guessed location after the settings are saved.
MISSING
) if ($e =~ m/Error/);

$e .= $this->warnAboutWindowsBackSlashes( $Foswiki::cfg{PubDir} );

# Don't check directories against {RCS} permissions on Windows
Expand Down
4 changes: 2 additions & 2 deletions core/lib/Foswiki/Configure/Checkers/PubUrlPath.pm
Expand Up @@ -14,8 +14,8 @@ sub check {
&& $Foswiki::cfg{PubUrlPath} ne 'NOT SET' )
{
my $guess = $Foswiki::cfg{ScriptUrlPath};
$guess =~ s/bin$/pub/;
$guess = '/pub' unless ($guess);
$guess =~ s/\/.*?bin$/\/pub/;
$guess .= '/pub' unless ($guess =~ m/pub$/);
$Foswiki::cfg{PubUrlPath} = $guess;
return $this->guessed(0);
}
Expand Down

0 comments on commit 49b04ac

Please sign in to comment.