Skip to content

Commit ee1f27f

Browse files
core: services: commander: Ignore ardupilot-manager and kraken
Signed-off-by: Patrick José Pereira <[email protected]>
1 parent 3bdec9b commit ee1f27f

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

core/services/commander/main.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import json
44
import logging
55
import os
6-
import shutil
76
import subprocess
87
import time
98
from enum import Enum
@@ -167,11 +166,13 @@ async def do_eeprom_update(i_know_what_i_am_doing: bool = False) -> Any:
167166
async def reset_settings(i_know_what_i_am_doing: bool = False) -> Any:
168167
check_what_i_am_doing(i_know_what_i_am_doing)
169168
# Be sure to not delete bootstrap to avoid going back to factory image
170-
bootstrap_config_path = "/root/.config/bootstrap/startup.json"
171-
temporary_location = "/tmp/bootstrap_startup.json"
172-
shutil.copy2(bootstrap_config_path, temporary_location)
173-
delete_everything(Path(appdirs.user_config_dir()))
174-
shutil.copy2(temporary_location, bootstrap_config_path)
169+
ignore = [
170+
Path("/root/.config/ardupilot-manager"),
171+
Path("/root/.config/bag-of-holding"),
172+
Path("/root/.config/bootstrap"),
173+
Path("/root/.config/kraken"),
174+
]
175+
delete_everything(Path(appdirs.user_config_dir()), ignore=ignore)
175176

176177

177178
@app.post("/services/remove_log", status_code=status.HTTP_200_OK)

0 commit comments

Comments
 (0)