void
CowDiskImage::serialize(ostream &os)
{
- string cowFilename = Checkpoint::dir() + name() + ".cow";
+ string cowFilename = name() + ".cow";
SERIALIZE_SCALAR(cowFilename);
save(cowFilename);
}
{
string cowFilename;
UNSERIALIZE_SCALAR(cowFilename);
+ cowFilename = cp->cptDir + "/" + cowFilename;
open(cowFilename);
}
Checkpoint::Checkpoint(const std::string &cpt_dir, const std::string &path,
const ConfigNode *_configNode)
- : db(new IniFile), basePath(path), configNode(_configNode)
+ : db(new IniFile), basePath(path), configNode(_configNode), cptDir(cpt_dir)
{
string filename = cpt_dir + "/" + Checkpoint::baseFilename;
if (!db->load(filename)) {
Checkpoint(const std::string &cpt_dir, const std::string &path,
const ConfigNode *_configNode);
+ const std::string cptDir;
+
bool find(const std::string §ion, const std::string &entry,
std::string &value);