{
unsigned int num;
it->substr(snapper->infosDir().length() + 1) >> num;
+ if (num == 0)
+ {
+ y2err("invalid num 0. not adding snapshot");
+ continue;
+ }
XmlFile file(*it);
const xmlNode* root = file.getRootElement();
continue;
}
- getChildValue(node, "description", snapshot.description);
-
getChildValue(node, "pre_num", snapshot.pre_num);
+ getChildValue(node, "description", snapshot.description);
+
getChildValue(node, "cleanup", snapshot.cleanup);
const list<const xmlNode*> l = getChildNodes(node, "userdata");
setChildValue(node, "date", datetime(date, true, true));
- if (!description.empty())
- setChildValue(node, "description", description);
-
if (type == POST)
setChildValue(node, "pre_num", pre_num);
+ if (!description.empty())
+ setChildValue(node, "description", description);
+
if (!cleanup.empty())
setChildValue(node, "cleanup", cleanup);