From a8f818fca5002a6bb8bfd8e3622c9b8f3dc0b1c9 Mon Sep 17 00:00:00 2001 From: Mike Degatano Date: Mon, 30 Oct 2023 03:42:23 -0400 Subject: [PATCH] Don't remove folder itself on restore (#4654) * Don't remove folder itself on restore * Allow dirs exist on copytree --- supervisor/homeassistant/module.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/supervisor/homeassistant/module.py b/supervisor/homeassistant/module.py index 2ba39567c..70330cc2f 100644 --- a/supervisor/homeassistant/module.py +++ b/supervisor/homeassistant/module.py @@ -427,7 +427,7 @@ class HomeAssistant(FileConfiguration, CoreSysAttributes): temp_data, self.sys_config.path_homeassistant, symlinks=True, - dirs_exist_ok=bool(excludes), + dirs_exist_ok=True, ) _LOGGER.info("Restore Home Assistant Core config folder") @@ -436,7 +436,7 @@ class HomeAssistant(FileConfiguration, CoreSysAttributes): ) await remove_folder( self.sys_config.path_homeassistant, - content_only=bool(excludes), + content_only=True, excludes=excludes, tmp_dir=self.sys_config.path_tmp, )