Skip to content

Commit b700f11

Browse files
committed
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
2 parents dc8ce99 + ac62a36 commit b700f11

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

gitweb/gitweb.perl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -728,9 +728,11 @@ sub filter_and_validate_refs {
728728
sub read_config_file {
729729
my $filename = shift;
730730
return unless defined $filename;
731-
# die if there are errors parsing config file
732731
if (-e $filename) {
733732
do $filename;
733+
# die if there is a problem accessing the file
734+
die $! if $!;
735+
# die if there are errors parsing config file
734736
die $@ if $@;
735737
return 1;
736738
}

0 commit comments

Comments
 (0)