From 52193611cd0cd0388391a7bc1e1b30b2bbf617e7 Mon Sep 17 00:00:00 2001 From: Tom Duijf Date: Mon, 26 Oct 2015 00:10:32 +0000 Subject: [PATCH 1/2] Check for relative path --- homeassistant/components/downloader.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/homeassistant/components/downloader.py b/homeassistant/components/downloader.py index 6978dbd7fa9..d4cb8962141 100644 --- a/homeassistant/components/downloader.py +++ b/homeassistant/components/downloader.py @@ -42,6 +42,10 @@ def setup(hass, config): download_path = config[DOMAIN][CONF_DOWNLOAD_DIR] + # If path is relative, we assume relative to HASS config dir + if not os.path.isabs(download_path): + download_path = hass.config.path(download_path) + if not os.path.isdir(download_path): logger.error( From 9104ca815dedfe2addce95d95bc30ec5e787608e Mon Sep 17 00:00:00 2001 From: Tom Duijf Date: Mon, 26 Oct 2015 00:13:47 +0000 Subject: [PATCH 2/2] Indentation --- homeassistant/components/downloader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/downloader.py b/homeassistant/components/downloader.py index d4cb8962141..0bbf189ea3d 100644 --- a/homeassistant/components/downloader.py +++ b/homeassistant/components/downloader.py @@ -44,7 +44,7 @@ def setup(hass, config): # If path is relative, we assume relative to HASS config dir if not os.path.isabs(download_path): - download_path = hass.config.path(download_path) + download_path = hass.config.path(download_path) if not os.path.isdir(download_path):