mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-27 07:34:35 +02:00
+ Big fix on cache file
This commit is contained in:
parent
d927291037
commit
852c9ee79b
@ -100,6 +100,9 @@ sub read {
|
|||||||
} elsif (! -w $self->{statefile_dir} . "/" . $self->{statefile}) {
|
} 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}->add_option_msg(short_msg => "Cannot write statefile '" . $self->{statefile_dir} . "/" . $self->{statefile} . "'. Need write permissions on file.");
|
||||||
$self->{output}->option_exit();
|
$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}) {
|
unless (my $return = do $self->{statefile_dir} . "/" . $self->{statefile}) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user