#4429 Implement return status handling for command file interface

This commit is contained in:
Gaute Lindkvist
2019-05-23 13:59:19 +02:00
parent e29c7acc03
commit 650af20e06
61 changed files with 639 additions and 276 deletions

View File

@@ -40,7 +40,7 @@ RicfSetExportFolder::RicfSetExportFolder()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicfSetExportFolder::execute()
RicfCommandResponse RicfSetExportFolder::execute()
{
if (m_createFolder)
{
@@ -52,11 +52,14 @@ void RicfSetExportFolder::execute()
if (!dir.exists(m_path))
{
RiaLogging::error("Could not create folder : " + m_path);
QString error = QString("Could not create folder : %1").arg(m_path);
RiaLogging::error(error);
return RicfCommandResponse(RicfCommandResponse::COMMAND_ERROR, error);
}
}
}
RicfCommandFileExecutor* executor = RicfCommandFileExecutor::instance();
executor->setExportPath(m_type(), m_path);
return RicfCommandResponse();
}