From: Marcel van der Veldt Date: Tue, 17 May 2022 21:00:33 +0000 (+0200) Subject: add guard X-Git-Url: https://git.kitaultman.com/?a=commitdiff_plain;h=8fee3815cb60ae1e066670860d114607b3df19c2;p=music-assistant-server.git add guard --- diff --git a/music_assistant/controllers/music/providers/filesystem.py b/music_assistant/controllers/music/providers/filesystem.py index 189b996f..4fafc395 100644 --- a/music_assistant/controllers/music/providers/filesystem.py +++ b/music_assistant/controllers/music/providers/filesystem.py @@ -661,6 +661,8 @@ class FileSystemProvider(MusicProvider): def exists(self, file_path: str) -> bool: """Return bool is this FileSystem musicprovider has given file/dir.""" + if not file_path: + return False # guard # ensure we have a full path and not relative if self.config.path not in file_path: file_path = os.path.join(self.config.path, file_path)