diff options
author | Junio C Hamano <gitster@pobox.com> | 2024-01-24 00:40:37 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-01-24 00:40:37 +0300 |
commit | 4f1c71814faf9f96a1f2720cf00542378341c568 (patch) | |
tree | 7fe271508bf865f178709bd7a2d4bd8198ff630d | |
parent | d14db9ca76189f2c5d6bf303c21874212aaf72d9 (diff) | |
parent | ac62a3649fcfd7f2caa80ffdfb8c3135764291ef (diff) |
Merge branch 'mj/gitweb-unreadable-config-error' into jch
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
-rwxr-xr-x | gitweb/gitweb.perl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index fc6d5dd522..ccd14e0e30 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; } |