Don't serialize the absolute path so we can move checkpoints around.
sim/serialize.cc:
sim/serialize.hh:
export the checkpoint directory
--HG--
extra : convert_revision : ba5b796fd930ab0487a502beefcf76bd6bb7c366
This commit is contained in:
@@ -431,7 +431,7 @@ Serializable::create(Checkpoint *cp, const std::string §ion)
|
||||
|
||||
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)) {
|
||||
|
||||
@@ -210,6 +210,8 @@ class Checkpoint
|
||||
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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user