sculpt manager: ignore empty deploy configs

When copying config/managed/deploy to config/deploy, the latter may
temporarily result in an empty configuration. Such an intermediate
state should be ignored to keep the currently running scenario in tact
instead of restarting it.
This commit is contained in:
Norman Feske 2019-11-21 15:04:55 +01:00
parent 4622ddb46f
commit e76ce05844
1 changed files with 9 additions and 0 deletions

View File

@ -74,6 +74,15 @@ struct Sculpt::Deploy
void update_managed_deploy_config(Xml_node deploy)
{
/*
* Ignore intermediate states that may occur when manually updating
* the config/deploy configuration. Depending on the tool used,
* the original file may be unlinked before the new version is
* created. The temporary empty configuration must not be applied.
*/
if (deploy.type() == "empty")
return;
_managed_deploy_config.generate([&] (Xml_generator &xml) {
Arch const arch = deploy.attribute_value("arch", Arch());