]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
- fixed SysconfigFile::getValue for empty list
authorArvin Schnell <aschnell@suse.de>
Wed, 1 Jun 2011 17:00:12 +0000 (19:00 +0200)
committerArvin Schnell <aschnell@suse.de>
Wed, 1 Jun 2011 17:00:12 +0000 (19:00 +0200)
snapper/AsciiFile.cc

index 10f2c00b2a5c1cf924c6f605a24c8db5050c5b52..b5795eda403969aca39b8161a9cb1cf7341c08aa 100644 (file)
@@ -190,10 +190,14 @@ AsciiFile::save()
     SysconfigFile::getValue(const string& key, vector<string>& values) const
     {
        string tmp;
-       if (!getValue("SNAPPER_CONFIGS", tmp))
+       if (!getValue(key, tmp))
            return false;
 
-       boost::split(values, tmp, boost::is_any_of(" \t"));
+       values.clear();
+
+       if (!tmp.empty())
+           boost::split(values, tmp, boost::is_any_of(" \t"), boost::token_compress_on);
+
        return true;
     }