mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-13 04:06:33 +00:00
Don't remove folder itself on restore (#4654)
* Don't remove folder itself on restore * Allow dirs exist on copytree
This commit is contained in:
parent
0f600da096
commit
a8f818fca5
@ -427,7 +427,7 @@ class HomeAssistant(FileConfiguration, CoreSysAttributes):
|
|||||||
temp_data,
|
temp_data,
|
||||||
self.sys_config.path_homeassistant,
|
self.sys_config.path_homeassistant,
|
||||||
symlinks=True,
|
symlinks=True,
|
||||||
dirs_exist_ok=bool(excludes),
|
dirs_exist_ok=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
_LOGGER.info("Restore Home Assistant Core config folder")
|
_LOGGER.info("Restore Home Assistant Core config folder")
|
||||||
@ -436,7 +436,7 @@ class HomeAssistant(FileConfiguration, CoreSysAttributes):
|
|||||||
)
|
)
|
||||||
await remove_folder(
|
await remove_folder(
|
||||||
self.sys_config.path_homeassistant,
|
self.sys_config.path_homeassistant,
|
||||||
content_only=bool(excludes),
|
content_only=True,
|
||||||
excludes=excludes,
|
excludes=excludes,
|
||||||
tmp_dir=self.sys_config.path_tmp,
|
tmp_dir=self.sys_config.path_tmp,
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user