190 build попытка 2
This commit is contained in:
@@ -77,7 +77,6 @@ def prepare_ui_storage(settings_dir: Path, *, filenames: tuple[str, ...], legacy
|
||||
if not valid:
|
||||
raise ValueError(f"Не удалось перенести настройки интерфейса: {source.name} повреждён")
|
||||
atomic_write(destination, content)
|
||||
<<<<<<< HEAD
|
||||
# Import recovery history exactly once. Otherwise every restart resurrects
|
||||
# old backups that rolling retention already removed.
|
||||
old_backups = settings_dir / "backups"
|
||||
@@ -91,15 +90,4 @@ def prepare_ui_storage(settings_dir: Path, *, filenames: tuple[str, ...], legacy
|
||||
if not destination.exists():
|
||||
shutil.copy2(source, destination)
|
||||
atomic_write(marker, json.dumps({"completed": True, "version": 1}))
|
||||
=======
|
||||
# Preserve the previous recovery history as well as the current config.
|
||||
old_backups = settings_dir / "backups"
|
||||
new_backups = directory / "backups"
|
||||
new_backups.mkdir(exist_ok=True)
|
||||
for filename in (*filenames, legacy_filename):
|
||||
for source in old_backups.glob(Path(filename).stem + "_*.json"):
|
||||
destination = new_backups / source.name
|
||||
if not destination.exists():
|
||||
shutil.copy2(source, destination)
|
||||
>>>>>>> e4bedb1264fca8a6bc8a41f0ca1ff67b176c6651
|
||||
return directory
|
||||
|
||||
Reference in New Issue
Block a user