Unverified Commit e2b5c112 authored by Stefan Hornburg (Racke)'s avatar Stefan Hornburg (Racke)
Browse files

Report error when archive file exists to show possible permission problems.

parent f2f12b14
......@@ -215,9 +215,16 @@ sub html_fetch {
return undef unless $self->{arc_directory};
return undef unless $options{file};
my $handle =
IO::File->new($self->{arc_directory} . '/' . $options{file}, '<');
return undef unless $handle;
my $html_file = $self->{arc_directory} . '/' . $options{file};
my $handle = IO::File->new($html_file, '<');
unless ($handle) {
if (-f $html_file) {
$log->syslog('err', 'Failed to open archive file %s: %s',
$html_file, $ERRNO);
}
return undef;
}
my $metadata = {}; # May be empty.
while (<$handle>) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment