mirror of
https://github.com/tcsenpai/Zundler.git
synced 2025-07-28 13:41:49 +00:00

This fixes a bug that appears if the document is built on a system without libmagic1. The python library python-magic uses it to guess the mime type. We treat files with unknown mime type as `octet-stream`, which causes them to be downloaded rather than displayed in the main iframe. This results in lots of popups when opening the resulting HTML file in a browser. In this commit we add a fallback to the built-in library `mimetypes` which gueses the mime type from the filename alone. This should work in most cases but could still fail. Close #2.