]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
- robuster code
authorArvin Schnell <aschnell@suse.de>
Wed, 15 Jun 2011 12:44:38 +0000 (14:44 +0200)
committerArvin Schnell <aschnell@suse.de>
Wed, 15 Jun 2011 12:44:38 +0000 (14:44 +0200)
snapper/AsciiFile.cc

index b5795eda403969aca39b8161a9cb1cf7341c08aa..afd3bb01df6cce80f2be25751d30c56c44360251 100644 (file)
@@ -189,11 +189,13 @@ AsciiFile::save()
     bool
     SysconfigFile::getValue(const string& key, vector<string>& 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);