- Fixed bug whereby adding a new task with "task add asdfsd pri:" resulted in gibberish values in the priority field.

This commit is contained in:
Paul Beckingham
2008-07-05 16:49:41 -04:00
parent 188b9f36f2
commit e85d36cea0
7 changed files with 25 additions and 4 deletions

View File

@@ -403,6 +403,14 @@ void handleAdd (const TDB& tdb, T& task, Config& conf)
sprintf (entryTime, "%u", (unsigned int) time (NULL));
task.setAttribute ("entry", entryTime);
std::map <std::string, std::string> atts;
task.getAttributes (atts);
foreach (i, atts)
{
if (i->second == "")
task.removeAttribute (i->first);
}
if (task.getAttribute ("recur") != "")
decorateRecurringTask (task);