mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-04 03:18:33 +02:00
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:
parent
2b7c2f6a21
commit
1e510f66ef
1 changed files with 5 additions and 13 deletions
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 ()
|
||||
{
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue