From 49b04ac39228694a103346acaa6de33b98b4edf1 Mon Sep 17 00:00:00 2001 From: GeorgeClark Date: Sun, 28 Nov 2010 23:42:49 +0000 Subject: [PATCH] Item10069: Make sure a /pub directory is guessed. It's missing for 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 --- core/lib/Foswiki/Configure/Checkers/PubDir.pm | 9 +++++++++ core/lib/Foswiki/Configure/Checkers/PubUrlPath.pm | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/core/lib/Foswiki/Configure/Checkers/PubDir.pm b/core/lib/Foswiki/Configure/Checkers/PubDir.pm index b731e91d12..5fdbbedecb 100755 --- a/core/lib/Foswiki/Configure/Checkers/PubDir.pm +++ b/core/lib/Foswiki/Configure/Checkers/PubDir.pm @@ -14,6 +14,15 @@ sub check { $this->{fileErrors} = 0; $this->{excessPerms} = 0; my $e = $this->guessMajorDir( 'PubDir', 'pub' ); + + $e .= $this->NOTE(<$Foswiki::cfg{ScriptDir}) 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 diff --git a/core/lib/Foswiki/Configure/Checkers/PubUrlPath.pm b/core/lib/Foswiki/Configure/Checkers/PubUrlPath.pm index cb9396b49d..66c4cf3fc1 100755 --- a/core/lib/Foswiki/Configure/Checkers/PubUrlPath.pm +++ b/core/lib/Foswiki/Configure/Checkers/PubUrlPath.pm @@ -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); }