summaryrefslogtreecommitdiff
path: root/gitweb/gitweb.perl
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-01-26 16:54:46 (GMT)
committerJunio C Hamano <gitster@pobox.com>2024-01-26 16:54:46 (GMT)
commitb700f119d183423916be7b8b0a2d48970cdf20e5 (patch)
tree96be08075da5f19a6f8106c9a1edd25158bb1fea /gitweb/gitweb.perl
parentdc8ce995a2ad203ffb5ef335682b64da955e645a (diff)
parentac62a3649fcfd7f2caa80ffdfb8c3135764291ef (diff)
downloadgit-b700f119d183423916be7b8b0a2d48970cdf20e5.zip
git-b700f119d183423916be7b8b0a2d48970cdf20e5.tar.gz
git-b700f119d183423916be7b8b0a2d48970cdf20e5.tar.bz2
Merge branch 'mj/gitweb-unreadable-config-error'
When given an existing but unreadable file as a configuration file, gitweb behaved as if the file did not exist at all, but now it errors out. This is a change that may break backward compatibility. * mj/gitweb-unreadable-config-error: gitweb: die when a configuration file cannot be read
Diffstat (limited to 'gitweb/gitweb.perl')
-rwxr-xr-xgitweb/gitweb.perl4
1 files changed, 3 insertions, 1 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index fc6d5dd..ccd14e0 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -728,9 +728,11 @@ our $per_request_config = 1;
sub read_config_file {
my $filename = shift;
return unless defined $filename;
- # die if there are errors parsing config file
if (-e $filename) {
do $filename;
+ # die if there is a problem accessing the file
+ die $! if $!;
+ # die if there are errors parsing config file
die $@ if $@;
return 1;
}