Bug
- Fixed nasty bug whereby TF2::clear wiped the file names (pending.data etc) and so any subsequent TDB2::commit never even opened the file. Yikes.
This commit is contained in:
18
src/TDB2.cpp
18
src/TDB2.cpp
@@ -410,7 +410,9 @@ void TF2::clear ()
|
||||
_loaded_contents = false;
|
||||
|
||||
_contents = "";
|
||||
_file._data = "";
|
||||
|
||||
// Note that the actual file name is deliberately not cleared.
|
||||
//_file._data = "";
|
||||
|
||||
_tasks.clear ();
|
||||
_added_tasks.clear ();
|
||||
@@ -474,16 +476,6 @@ const std::string TF2::dump ()
|
||||
return std::string (buffer);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
TDB2::TDB2 ()
|
||||
: _location ("")
|
||||
@@ -492,8 +484,8 @@ TDB2::TDB2 ()
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Deliberately no file writes on destruct. TDB2::commit should have been
|
||||
// already called, if data is to be preserved.
|
||||
// Deliberately no file writes on destruct. Commit should have been already
|
||||
// called, if data is to be preserved.
|
||||
TDB2::~TDB2 ()
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user