Skip to content

Commit 060273f

Browse files
core: services: commander: Ignore ardupilot-manager besides bootstrap
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
1 parent 40b4cc4 commit 060273f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

core/services/commander/main.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -167,11 +167,11 @@ async def do_eeprom_update(i_know_what_i_am_doing: bool = False) -> Any:
167167
async def reset_settings(i_know_what_i_am_doing: bool = False) -> Any:
168168
check_what_i_am_doing(i_know_what_i_am_doing)
169169
# 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)
170+
ignore = [
171+
Path("/root/.config/ardupilot-manager"),
172+
Path("/root/.config/bootstrap"),
173+
]
174+
delete_everything(Path(appdirs.user_config_dir()), ignore=ignore)
175175

176176

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

0 commit comments

Comments
 (0)