feat(backup): integrate backup functionality into multiple extensions and config management

This commit is contained in:
dw-0
2025-09-30 20:36:42 +02:00
parent 5b68710b23
commit 8a8afc60ee
10 changed files with 27 additions and 3 deletions

View File

@@ -73,7 +73,7 @@ def add_config_section_at_top(section: str, instances: List[InstanceType]) -> No
tmp.writelines(org_content)
cfg_file.unlink()
shutil.move(tmp_cfg_path, cfg_file)
shutil.move(tmp_cfg_path.as_posix(), cfg_file)
Logger.print_ok("OK!")
@@ -81,7 +81,7 @@ def add_config_section_at_top(section: str, instances: List[InstanceType]) -> No
def remove_config_section(
section: str, instances: List[InstanceType]
) -> List[InstanceType]:
removed_from: List[instances] = []
removed_from: List[InstanceType] = []
for instance in instances:
cfg_file = instance.cfg_file
Logger.print_status(f"Remove section '[{section}]' from '{cfg_file}' ...")