Kozea / WeasyPrint

The awesome document factory
https://weasyprint.org
BSD 3-Clause "New" or "Revised" License
7.2k stars 682 forks source link

Temporary directory does not get removed #2090

Open braggpeaks opened 8 months ago

braggpeaks commented 8 months ago

weasyprint apparently creates a temporary directory but does not remove the directory afterwards.

Windows folder location: C:\Users\daniel.kellner\AppData\Local\Temp Subfolder naming example: weasyprint-0qjsm58z

The folders are empty but I believe they should be removed to not leave unnecessary folders (I currently have 8000 of these weasyprint-* folders, don't ask 😂).

liZe commented 8 months ago

Hi!

The folders are supposed to be removed here, but:

The "real" solution would be to only use data in memory (fonts are not that big). It should be possible to keep config files in memory thanks to FcConfigParseAndLoadFromMemory but there’s nothing to replace FcConfigAppFontAddFile.

If someone finds a better solution, I’ll be happy to try!