From: <Sve...@nt...> - 2005-07-03 15:53:05
|
Author: SvenDowideit Date: 2005-07-03 08:52:22 -0700 (Sun, 03 Jul 2005) New Revision: 4509 Modified: twiki/branches/DEVELOP/bin/configure Log: Item44: check directory paths for \ - and warn that they should use / also don't check _svn and .svn directories to see if they are writeable (incase you're running configure on a Subversion shadow Modified: twiki/branches/DEVELOP/bin/configure =================================================================== --- twiki/branches/DEVELOP/bin/configure 2005-07-03 15:16:40 UTC (rev 4508) +++ twiki/branches/DEVELOP/bin/configure 2005-07-03 15:52:22 UTC (rev 4509) @@ -294,15 +294,24 @@ return WARN($GUESSED); } +sub _warnAboutWindowsBackSlashes { + my ( $path ) = @_; + if ( $path =~ /\\/ ) { + return WARN('please use c:/path slashes, not c:\\path ('.$path.')'); + } +} + sub _checkPubDir { my $e = _findMajorDir('PubDir', 'pub'); + $e .= _warnAboutWindowsBackSlashes($TWiki::cfg{PubDir}); my $e2 = _checkTreePerms( $TWiki::cfg{PubDir}, 'rw' ); - $e = WARN($e2) if $e2; + $e .= WARN($e2) if $e2; return $e; } sub _checkTemplateDir { my $e = _findMajorDir('TemplateDir', 'templates'); + $e .= _warnAboutWindowsBackSlashes($TWiki::cfg{TemplateDir}); my $e2 = _checkTreePerms( $TWiki::cfg{TemplateDir}, 'r' ); $e .= ERROR($e2) if $e2; return $e; @@ -311,6 +320,7 @@ sub _checkDataDir { my $e = _findMajorDir('DataDir', 'data'); my $e2 = _checkTreePerms( $TWiki::cfg{DataDir}, "r" ); + $e .= _warnAboutWindowsBackSlashes($TWiki::cfg{DataDir}); $e2 = _checkTreePerms( $TWiki::cfg{DataDir}, "w", qr/\.txt$/ ) unless $e2; $e .= WARN($e2) if $e2; @@ -552,6 +562,10 @@ return '' if( defined($filter) && $path !~ $filter && !-d $path); + #lets ignore Subversion directories + return '' if( $path !~ /_svn/ ); + return '' if( $path !~ /.svn/ ); + my $errs = ''; return $path. ' cannot be found<br />' unless( -e $path ); |