- 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:
Paul Beckingham 2011-09-03 16:30:15 -04:00
parent 2b7c2f6a21
commit 1e510f66ef

View file

@ -410,7 +410,9 @@ void TF2::clear ()
_loaded_contents = false; _loaded_contents = false;
_contents = ""; _contents = "";
_file._data = "";
// Note that the actual file name is deliberately not cleared.
//_file._data = "";
_tasks.clear (); _tasks.clear ();
_added_tasks.clear (); _added_tasks.clear ();
@ -474,16 +476,6 @@ const std::string TF2::dump ()
return std::string (buffer); return std::string (buffer);
} }
////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
TDB2::TDB2 () TDB2::TDB2 ()
: _location ("") : _location ("")
@ -492,8 +484,8 @@ TDB2::TDB2 ()
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// Deliberately no file writes on destruct. TDB2::commit should have been // Deliberately no file writes on destruct. Commit should have been already
// already called, if data is to be preserved. // called, if data is to be preserved.
TDB2::~TDB2 () TDB2::~TDB2 ()
{ {
} }