mimemagicrb / mimemagic

Mime type detection in ruby via file extension or file content
https://github.com/mimemagicrb/mimemagic
MIT License
419 stars 444 forks source link

Question regarding dependency path(s) #157

Open dvodvo opened 3 years ago

dvodvo commented 3 years ago

First a note of appreciation for all the quick efforts at remedying the licensing situation]

The following, to me, is not obvious:

"Place the file freedesktop.org.xml in an appropriate location, and then set the environment variable FREEDESKTOP_MIME_TYPES_PATH to that path"

What is an appropriate location? The purported location it's being looked for when the gem is installed. ? If so, when installing the gem version will it indicate which directory it is looking for? Or other options those suggested when attempting to install a most recent version:

["/usr/local/share/mime/packages/freedesktop.org.xml",
 "/opt/local/share/mime/packages/freedesktop.org.xml",
"/usr/share/mime/packages/freedesktop.org.xml"]

Should one assume to set FREEDESKTOP_MIME_TYPES_PATH in the application or relative environment ruby file - or is there a recommendation?

katafrakt commented 3 years ago

These paths are tried by default sou you can treat them as recommended locations, I guess. If for some reason, you cannot use one of these, I think there's no recommendation, but the path should generally be absolute, not relative.