зеркало из https://github.com/microsoft/git.git
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
This commit is contained in:
Коммит
b700f119d1
|
@ -728,9 +728,11 @@ our $per_request_config = 1;
|
||||||
sub read_config_file {
|
sub read_config_file {
|
||||||
my $filename = shift;
|
my $filename = shift;
|
||||||
return unless defined $filename;
|
return unless defined $filename;
|
||||||
# die if there are errors parsing config file
|
|
||||||
if (-e $filename) {
|
if (-e $filename) {
|
||||||
do $filename;
|
do $filename;
|
||||||
|
# die if there is a problem accessing the file
|
||||||
|
die $! if $!;
|
||||||
|
# die if there are errors parsing config file
|
||||||
die $@ if $@;
|
die $@ if $@;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче