From: Gunnar Beutner Date: Tue, 3 Sep 2013 08:32:42 +0000 (+0200) Subject: cluster: Handle non-numeric log file names. X-Git-Tag: v0.0.3~615 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2b77aa06aad734321c8a486c9092773e42585781;p=icinga2 cluster: Handle non-numeric log file names. --- diff --git a/components/cluster/clustercomponent.cpp b/components/cluster/clustercomponent.cpp index f4229af1f..aa704c895 100644 --- a/components/cluster/clustercomponent.cpp +++ b/components/cluster/clustercomponent.cpp @@ -276,7 +276,15 @@ void ClusterComponent::CloseLogFile(void) void ClusterComponent::LogGlobHandler(std::vector& files, const String& 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); }