Yajl: Fix for the empty_object test
@@ -260,14 +260,13 @@ int elektraYajlSet (Plugin * handle ELEKTRA_UNUSED, KeySet * returned, Key * par
yajl_gen_config (g, yajl_gen_beautify, 1);
#endif
- if (ksGetSize (returned) == 1) {
- elektraGenValue(g, parentKey, ksTail (returned));
+ if (ksGetSize (returned) == 1 && keyGetValueSize(ksHead(returned)) > 1) {
+ elektraGenValue(g, parentKey, ksHead (returned));
int ret = elektraGenWriteFile (g, parentKey);
yajl_gen_free (g);
return ret;
}
-
if (elektraGenEmpty (g, returned, parentKey))
{
int ret = elektraGenWriteFile (g, parentKey);
