fix: remove lock file on interruption of 'task edit' (#2292)

This commit is contained in:
indev 2021-01-15 02:00:11 +07:00 committed by Tomas Babej
parent 663c6575ce
commit 098be0747d

View file

@ -826,12 +826,16 @@ ARE_THESE_REALLY_HARMFUL:
{
std::cerr << "Error: " << problem << '\n';
// Preserve the edits.
before = after;
File::write (file.str (), before);
File::remove (file.str());
if (confirm ("Taskwarrior couldn't handle your edits. Would you like to try again?"))
{
// Preserve the edits.
before = after;
File::write (file.str (), before);
goto ARE_THESE_REALLY_HARMFUL;
}
}
else
changes = true;