Skip to content

Commit

Permalink
fixed path sanitization when creating m3u file
Browse files Browse the repository at this point in the history
  • Loading branch information
xnetcat committed Nov 14, 2024
1 parent 9950a3f commit e80f84d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion spotdl/utils/m3u.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e80f84d

Please sign in to comment.