From: Marcel van der Veldt Date: Tue, 18 Feb 2025 20:56:10 +0000 (+0100) Subject: Fix: Add check to cache folder migration for existing folder X-Git-Url: https://git.kitaultman.com/?a=commitdiff_plain;h=df51a814247365052082a3a04d234956ddd965b4;p=music-assistant-server.git Fix: Add check to cache folder migration for existing folder --- diff --git a/music_assistant/mass.py b/music_assistant/mass.py index 2bc9b135..581c0be5 100644 --- a/music_assistant/mass.py +++ b/music_assistant/mass.py @@ -843,4 +843,7 @@ class MusicAssistant: if filename.startswith(("spotify", "collage")): old_loc = os.path.join(self.storage_path, filename) new_loc = os.path.join(self.cache_path, filename) - await rename(old_loc, new_loc) + if await isfile(new_loc): + await rmfile(old_loc) + else: + await rename(old_loc, new_loc)