Fix boot loop after restoring backup (#133581)

This commit is contained in:
Erik Montnemery
2024-12-19 16:04:59 +01:00
committed by GitHub
parent 94c7d18346
commit 255f85eb2f
2 changed files with 9 additions and 3 deletions

View File

@ -64,6 +64,9 @@ def restore_backup_file_content(config_dir: Path) -> RestoreBackupFileContent |
)
except (FileNotFoundError, KeyError, json.JSONDecodeError):
return None
finally:
# Always remove the backup instruction file to prevent a boot loop
instruction_path.unlink(missing_ok=True)
def _clear_configuration_directory(config_dir: Path, keep: Iterable[str]) -> None: