mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-26 06:37:20 +02:00
TDB2
- Full implementation of TDB2::add, which includes pending/completed, undo and backlog. - Removed obsolete TF2::commitUndo, which is no longer necessary. - Added File::truncate method, to allow a TDB2 shortcut.
This commit is contained in:
parent
02df3853f7
commit
fb6dc5058f
4 changed files with 69 additions and 71 deletions
10
src/File.cpp
10
src/File.cpp
|
@ -280,6 +280,16 @@ void File::append (const std::vector <std::string>& lines)
|
|||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void File::truncate ()
|
||||
{
|
||||
if (!fh)
|
||||
open ();
|
||||
|
||||
if (fh)
|
||||
ftruncate (h, 0);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// S_IFMT 0170000 type of file
|
||||
// S_IFIFO 0010000 named pipe (fifo)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue