From: Arvin Schnell Date: Wed, 15 Jun 2011 12:44:38 +0000 (+0200) Subject: - robuster code X-Git-Tag: v0.1.3~355 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=d4f1d4135f89d424c48bb9ce035cd5eb8fb4c58e;p=thirdparty%2Fsnapper.git - robuster code --- diff --git a/snapper/AsciiFile.cc b/snapper/AsciiFile.cc index b5795eda..afd3bb01 100644 --- a/snapper/AsciiFile.cc +++ b/snapper/AsciiFile.cc @@ -189,11 +189,13 @@ AsciiFile::save() bool SysconfigFile::getValue(const string& key, vector& values) const { + values.clear(); + string tmp; if (!getValue(key, tmp)) return false; - values.clear(); + boost::trim(tmp, locale::classic()); if (!tmp.empty()) boost::split(values, tmp, boost::is_any_of(" \t"), boost::token_compress_on);