globocom / m3u8

Python m3u8 Parser for HTTP Live Streaming (HLS) Transmissions
Other
2.03k stars 471 forks source link

playlist.dump() fails when saving file to root folder on Windows. #291

Closed arix00 closed 2 years ago

arix00 commented 2 years ago

I guess nobody saves m3u8 on root directory but r: is a ramdisk on my system and following code will fail

playlist.dump("r:/aaa.m3u8")

with access denied error.

https://github.com/globocom/m3u8/blob/50963a865b09396302284a300ec8aff5e8317bbc/m3u8/model.py#L369-L376

so maybe add exist_ok=True? or an extra check for root folder?

bbayles commented 2 years ago

https://github.com/globocom/m3u8/pull/292 should fix this. Can you confirm?

arix00 commented 2 years ago

Thanks. Tested and all good now.