mirror of
https://github.com/Icinga/icinga2.git
synced 2025-09-25 10:48:20 +02:00
cluster: Handle non-numeric log file names.
This commit is contained in:
parent
8098329a33
commit
2b77aa06aa
@ -276,7 +276,15 @@ void ClusterComponent::CloseLogFile(void)
|
|||||||
void ClusterComponent::LogGlobHandler(std::vector<int>& files, const String& file)
|
void ClusterComponent::LogGlobHandler(std::vector<int>& files, const String& file)
|
||||||
{
|
{
|
||||||
String name = Utility::BaseName(file);
|
String name = Utility::BaseName(file);
|
||||||
int ts = Convert::ToLong(name);
|
|
||||||
|
int ts;
|
||||||
|
|
||||||
|
try {
|
||||||
|
ts = Convert::ToLong(name);
|
||||||
|
} catch (const std::exception&) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
files.push_back(ts);
|
files.push_back(ts);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user