Avoid exceptions in some shutdown corner cases.
Change-Id: I1c301dc96d925fd5d74c00bf4b9417782822a997
This commit is contained in:
parent
4f804a48fe
commit
83d687825d
1 changed files with 8 additions and 5 deletions
|
@ -1915,11 +1915,14 @@ void ConvertToBroker::removeFile(const std::string &uriOrig)
|
|||
{
|
||||
if (!uriOrig.empty())
|
||||
{
|
||||
// Remove source file and directory
|
||||
Poco::Path path = uriOrig;
|
||||
Poco::File(path).remove();
|
||||
Poco::File(path.makeParent()).remove();
|
||||
FileUtil::removeFile(uriOrig);
|
||||
try {
|
||||
// Remove source file and directory
|
||||
Poco::Path path = uriOrig;
|
||||
Poco::File(path).remove();
|
||||
Poco::File(path.makeParent()).remove();
|
||||
} catch (const std::exception &ex) {
|
||||
LOG_ERR("Error while removing conversion temporary: '" << uriOrig << "' - " << ex.what());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue