+ Big fix on cache file

This commit is contained in:
Quentin Garnier 2014-02-20 17:58:37 +01:00
parent 89ddfbb1fa
commit ea300fceb1
1 changed files with 3 additions and 0 deletions

View File

@ -100,6 +100,9 @@ sub read {
} elsif (! -w $self->{statefile_dir} . "/" . $self->{statefile}) {
$self->{output}->add_option_msg(short_msg => "Cannot write statefile '" . $self->{statefile_dir} . "/" . $self->{statefile} . "'. Need write permissions on file.");
$self->{output}->option_exit();
} elsif (! -s $self->{statefile_dir} . "/" . $self->{statefile}) {
# Empty file. Not a problem. Maybe plugin not manage not values
return 0;
}
unless (my $return = do $self->{statefile_dir} . "/" . $self->{statefile}) {