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 Franck Nijhof
parent 7a2f6ce430
commit 35ff633d99
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3

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,