void ContainersManager::handleGetActiveContainerIdCall(dbus::MethodResultBuilder::Pointer result)
{
LOGI("GetActiveContainerId call");
- if (mContainers[mConfig.foregroundId]->isRunning()){
+ if (!mConfig.foregroundId.empty() && mContainers[mConfig.foregroundId]->isRunning()){
result->set(g_variant_new("(s)", mConfig.foregroundId.c_str()));
} else {
result->set(g_variant_new("(s)", ""));
try {
LOGD("Removing copied data");
fs::remove_all(fs::path(path));
- } catch(const boost::exception& e) {
+ } catch(const std::exception& e) {
LOGW("Failed to remove data: " << boost::diagnostic_information(e));
}
};
return;
}
- auto resultCallback = [result, containerPathStr, removeAllWrapper](bool succeeded) {
+ auto resultCallback = [this, id, result, containerPathStr, removeAllWrapper](bool succeeded) {
if (succeeded) {
+ focus(id);
result->setVoid();
} else {
LOGE("Failed to start container.");