Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
arix00 opened this issue Aug 10, 2022 · 2 comments · Fixed by #292
Closed

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

arix00 opened this issue Aug 10, 2022 · 2 comments · Fixed by #292

Comments

@arix00
Copy link

arix00 commented Aug 10, 2022

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.

m3u8/m3u8/model.py

Lines 369 to 376 in 50963a8

def _create_sub_directories(self, filename):
basename = os.path.dirname(filename)
try:
if basename:
os.makedirs(basename)
except OSError as error:
if error.errno != errno.EEXIST:
raise

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

@arix00 arix00 changed the title playlist.dumps() fails when saving file to root folder on Windows. playlist.dump() fails when saving file to root folder on Windows. Aug 10, 2022
@bbayles
Copy link
Contributor

bbayles commented Aug 10, 2022

#292 should fix this. Can you confirm?

@arix00
Copy link
Author

arix00 commented Aug 10, 2022

Thanks. Tested and all good now.

@arix00 arix00 closed this as completed Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants