TW-1575: task log mangles URLs when quoted
- Thanks to Luke Macken.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user