mbrubeck / tree_magic

Determines the MIME type of a file by traversing a filetype tree.
MIT License
34 stars 9 forks source link

Add macOS path to magic files #8

Closed egrieco closed 7 months ago

egrieco commented 2 years ago

I'm getting the following error: 'No MIME magic files found in the XDG default paths'

While tree_magic searches the following paths:

"/usr/share/mime/magic",
"/usr/local/share/mime/magic",
"$HOME/.local/share/mime/magic",

On macOS 11.6 (Build 20G165), the files in question are stored at: /usr/share/file/magic

mbrubeck commented 7 months ago

The files at /usr/share/file/magic are not in the “Shared MIME-info Database” format expected by this crate.