AlJohri / docx2pdf

MIT License
497 stars 94 forks source link

Release Windows docx file lock after premature script exit #100

Closed g1b3r1sh closed 5 months ago

g1b3r1sh commented 5 months ago

This fixes an issue where if an exception occurs while saving the docx as a pdf (ex. if the pdf file already exists and is being used by another application), then the script will exit without closing the docx. This makes the docx uneditable until the Word process is terminated.

This issue could also be present in the macOS code, although I can't confirm it because I don't have a Mac.