TW-1575: task log mangles URLs when quoted

- Thanks to Luke Macken.
This commit is contained in:
Paul Beckingham
2015-07-13 10:41:55 -04:00
parent 78bfe98070
commit 0990b0d582
3 changed files with 63 additions and 4 deletions

View File

@@ -47,28 +47,28 @@ CmdLog::CmdLog ()
////////////////////////////////////////////////////////////////////////////////
int CmdLog::execute (std::string& output)
{
int rc = 0;
// Apply the command line modifications to the new task.
Task task;
task.modify (Task::modReplace, true);
task.setStatus (Task::completed);
// Recurring tasks get a special status.
// Cannot log recurring tasks.
if (task.has ("recur"))
throw std::string (STRING_CMD_LOG_NO_RECUR);
// Cannot log waiting tasks.
if (task.has ("wait"))
throw std::string (STRING_CMD_LOG_NO_WAITING);
context.tdb2.add (task);
if (context.verbose ("project"))
context.footnote (onProjectChange (task));
if (context.verbose ("affected"))
output = std::string (STRING_CMD_LOG_LOGGED) + "\n";
return rc;
return 0;
}
////////////////////////////////////////////////////////////////////////////////