summaryrefslogtreecommitdiffstats
path: root/checksetup.pl
diff options
context:
space:
mode:
authorjustdave%syndicomm.com <>2002-12-02 10:47:20 +0100
committerjustdave%syndicomm.com <>2002-12-02 10:47:20 +0100
commit26b0bc8a1668e4f05b32ab16c7eaf363edc4432e (patch)
tree069af42d2f4bd14c44cd1e792976029c0507abf2 /checksetup.pl
parente343291a519ca636e5b2efc722173ffd82df38d1 (diff)
downloadbugzilla-26b0bc8a1668e4f05b32ab16c7eaf363edc4432e.tar.gz
bugzilla-26b0bc8a1668e4f05b32ab16c7eaf363edc4432e.tar.xz
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
Diffstat (limited to 'checksetup.pl')
-rwxr-xr-xchecksetup.pl22
1 files changed, 10 insertions, 12 deletions
diff --git a/checksetup.pl b/checksetup.pl
index aceb6a706..3543b45ee 100755
--- a/checksetup.pl
+++ b/checksetup.pl
@@ -924,17 +924,15 @@ END
if (-e 'data/template') {
print "Removing existing compiled templates ...\n" unless $silent;
- # If File::Path::rmtree reported errors, then I'd use that
- use File::Find;
- sub remove {
- return if $_ eq ".";
- if (-d $_) {
- rmdir $_ || die "Couldn't rmdir $_: $!\n";
- } else {
- unlink $_ || die "Couldn't unlink $_: $!\n";
- }
- }
- finddepth(\&remove, 'data/template');
+ File::Path::rmtree('data/template');
+
+ #Check that the directory was really removed
+ if(-e 'data/template') {
+ print "\n\n";
+ print "The data/template directory could not be removed. Please\n";
+ print "remove it manually and rerun checksetup.pl.\n\n";
+ exit;
+ }
}
# Precompile stuff. This speeds up initial access (so the template isn't
@@ -994,7 +992,7 @@ END
use Cwd;
- $::baseDir = getcwd();
+ $::baseDir = cwd();
# Don't hang on templates which use the CGI library
eval("use CGI qw(-no_debug)");