Bug 177850: checksetup.pl was failing if the user didn't have read permissions…

Bug 177850: checksetup.pl was failing if the user didn't have read permissions to the entire Bugzilla path Patch by Jussi Sirpoma <jussi@comlink.fi> r=justdave, a=justdave
parent e343291a
...@@ -924,17 +924,15 @@ END ...@@ -924,17 +924,15 @@ END
if (-e 'data/template') { if (-e 'data/template') {
print "Removing existing compiled templates ...\n" unless $silent; print "Removing existing compiled templates ...\n" unless $silent;
# If File::Path::rmtree reported errors, then I'd use that File::Path::rmtree('data/template');
use File::Find;
sub remove { #Check that the directory was really removed
return if $_ eq "."; if(-e 'data/template') {
if (-d $_) { print "\n\n";
rmdir $_ || die "Couldn't rmdir $_: $!\n"; print "The data/template directory could not be removed. Please\n";
} else { print "remove it manually and rerun checksetup.pl.\n\n";
unlink $_ || die "Couldn't unlink $_: $!\n"; exit;
} }
}
finddepth(\&remove, 'data/template');
} }
# Precompile stuff. This speeds up initial access (so the template isn't # Precompile stuff. This speeds up initial access (so the template isn't
...@@ -994,7 +992,7 @@ END ...@@ -994,7 +992,7 @@ END
use Cwd; use Cwd;
$::baseDir = getcwd(); $::baseDir = cwd();
# Don't hang on templates which use the CGI library # Don't hang on templates which use the CGI library
eval("use CGI qw(-no_debug)"); eval("use CGI qw(-no_debug)");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment