1
0
mirror of https://github.com/spl0k/supysonic.git synced 2024-09-20 03:11:04 +00:00

Fix for cache folder set as relative path

This commit is contained in:
spl0k 2017-10-14 14:25:32 +02:00
parent 62bcce331a
commit da4cde77e1

View File

@ -154,7 +154,7 @@ def cover_art():
return send_file(os.path.join(res.path, 'cover.jpg')) return send_file(os.path.join(res.path, 'cover.jpg'))
size_path = os.path.join(config.get('webapp', 'cache_dir'), str(size)) size_path = os.path.join(config.get('webapp', 'cache_dir'), str(size))
path = os.path.join(size_path, str(res.id)) path = os.path.abspath(os.path.join(size_path, str(res.id)))
if os.path.exists(path): if os.path.exists(path):
return send_file(path) return send_file(path)
if not os.path.exists(size_path): if not os.path.exists(size_path):