delete cache file if it contains one line only
git-svn-id: http://svn.centreon.com/trunk/plugins-2.x@11630 6bcd3966-0018-0410-8128-fd23d134de7e
This commit is contained in:
parent
a80ff21388
commit
615fc0a245
|
@ -288,7 +288,7 @@ if ($opt_n) {
|
|||
}
|
||||
|
||||
my $expr = "";
|
||||
if ($opt_d =~ m/^[A-Za-z]:/) {
|
||||
if ($opt_d =~ m/^[A-Za-z]:/i) {
|
||||
$opt_d =~ s/\\/\\\\/g;
|
||||
$expr = "^$opt_d";
|
||||
}elsif ($opt_d =~ m/^\//) {
|
||||
|
@ -308,6 +308,9 @@ if ($opt_n) {
|
|||
}
|
||||
$countLine++;
|
||||
}
|
||||
if ($countLine == 1) {
|
||||
unlink($cacheFile);
|
||||
}
|
||||
close(FILE);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue