From 4a879ce42498ee7c5d36255263642add133af7d2 Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Wed, 3 Apr 2024 09:56:19 +0200 Subject: [PATCH] Fix Downloader config flow (#114718) --- homeassistant/components/downloader/config_flow.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/downloader/config_flow.py b/homeassistant/components/downloader/config_flow.py index 69393c04985..635c241edc4 100644 --- a/homeassistant/components/downloader/config_flow.py +++ b/homeassistant/components/downloader/config_flow.py @@ -55,8 +55,9 @@ class DownloaderConfigFlow(ConfigFlow, domain=DOMAIN): async def _validate_input(self, user_input: dict[str, Any]) -> None: """Validate the user input if the directory exists.""" - if not os.path.isabs(user_input[CONF_DOWNLOAD_DIR]): - download_path = self.hass.config.path(user_input[CONF_DOWNLOAD_DIR]) + download_path = user_input[CONF_DOWNLOAD_DIR] + if not os.path.isabs(download_path): + download_path = self.hass.config.path(download_path) if not os.path.isdir(download_path): _LOGGER.error(