From 8fee3815cb60ae1e066670860d114607b3df19c2 Mon Sep 17 00:00:00 2001 From: Marcel van der Veldt Date: Tue, 17 May 2022 23:00:33 +0200 Subject: [PATCH] add guard --- music_assistant/controllers/music/providers/filesystem.py | 2 ++ 1 file changed, 2 insertions(+) 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) -- 2.34.1