Local media source: return different error if media folder doesnt exist (#39759)

This commit is contained in:
Bram Kragten 2020-09-07 20:38:06 +02:00 committed by GitHub
parent be8aa16170
commit d0e44893f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -83,6 +83,8 @@ class LocalSource(MediaSource):
full_path = Path(self.hass.config.path("media", location))
if not full_path.exists():
if location == "":
raise BrowseError("Media directory does not exist.")
raise BrowseError("Path does not exist.")
if not full_path.is_dir():