Avoid blocking IO in downloader config flow (#114741)

This commit is contained in:
Joost Lekkerkerker
2024-04-03 13:50:34 +02:00
committed by GitHub
parent e522f2f67e
commit b9f27d2b31

View File

@@ -59,7 +59,7 @@ class DownloaderConfigFlow(ConfigFlow, domain=DOMAIN):
if not os.path.isabs(download_path):
download_path = self.hass.config.path(download_path)
if not os.path.isdir(download_path):
if not await self.hass.async_add_executor_job(os.path.isdir, download_path):
_LOGGER.error(
"Download path %s does not exist. File Downloader not active",
download_path,