Added ctrl-c handling to reprocess and recovery tools.

This commit is contained in:
matlabbe
2018-02-13 16:54:31 -05:00
parent 3dfe1ccb1a
commit 02a64a7fa3
3 changed files with 26 additions and 11 deletions

View File

@@ -183,7 +183,7 @@ bool databaseRecovery(
{
rtabmap.close(false);
if(errorMsg)
*errorMsg = "Recovery canceled";
*errorMsg = uFormat("Recovery canceled, renaming back \"%s\" to \"%s\".", backupPath.c_str(), databasePath.c_str());
// put back the file as before
UFile::erase(databasePath);