arch1t3cht / Aegisub

Cross-platform advanced subtitle editor, with new feature branches. Read the README on the feature branch.
http://www.aegisub.org
Other
695 stars 32 forks source link

vapoursynth: Recursively create directories #113

Closed petzku closed 4 months ago

petzku commented 4 months ago

Currently, the script crashes if .cache/Aegisub does not exist. This is fixed by using os.makedirs to recursively create the parent directories as well if necessary.

The exist_ok option makes the try/except unnecessary.

arch1t3cht commented 4 months ago

Merged in abff2365d39c5a15f6c4482c84df7b23ce995304, thanks!

I also added another commit (deb0f19b1bd78a735cd7c6c9ff1babfd0e2819a5) that ensures that this directory exists from the C++ side, which is more consistent with the other video providers. But the os.makedirs call in the Python function still needs to be kept for when the user supplies a custom cachedir.