jellybob / mimemagic

Mime type detection in ruby via file extension or file content
https://github.com/minad/mimemagic
MIT License
10 stars 6 forks source link

Add default Macports freedesktop.org.xml install location #7

Open voikya opened 3 years ago

voikya commented 3 years ago

(Sorry for opening this here; I would do it over at mimemagicrb/mimemagic but it seems to be locking out new issues right now).

The script attempting to locate the mime types file includes the following default locations:

  possible_paths = [
    (File.expand_path(ENV["FREEDESKTOP_MIME_TYPES_PATH"]) if ENV["FREEDESKTOP_MIME_TYPES_PATH"]),
    "/usr/local/share/mime/packages/freedesktop.org.xml",
    "/opt/homebrew/share/mime/packages/freedesktop.org.xml",
    "/usr/share/mime/packages/freedesktop.org.xml"
  ].compact

Given that this includes the default Homebrew install location, could this also be updated to include the default Macports install location at /opt/local/share/mime/packages/freedesktop.org.xml, given that Macports is still a widely-used package manager?

fearoffish commented 3 years ago

Which MacPorts package installs to that location?

fearoffish commented 3 years ago

shared-mime-info <- found it

voikya commented 3 years ago

@fearoffish Yes, that's the one. I should have said that in my initial post, sorry!