From e80f84db7a160a2368fea98be1b784f13d8b1ece Mon Sep 17 00:00:00 2001 From: kuba Date: Thu, 14 Nov 2024 19:15:17 +0300 Subject: [PATCH] fixed path sanitization when creating m3u file --- spotdl/utils/m3u.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spotdl/utils/m3u.py b/spotdl/utils/m3u.py index d2dd5e829..908d29388 100644 --- a/spotdl/utils/m3u.py +++ b/spotdl/utils/m3u.py @@ -183,7 +183,9 @@ def create_m3u_file( detect_formats, ) - file_path = Path(sanitize_string(file_name)).absolute() + file_path = Path( + *(sanitize_string(part) for part in Path(file_name).parts) + ).absolute() with open(file_path, "w", encoding="utf-8") as m3u_file: m3u_file.write(m3u_content)