Comment 13 for bug 185165

Revision history for this message
Endolith (endolith) wrote :

As for the MIME type, I think there are actually two types of files here:

Files starting with [InternetShortcut] are type application/x-mswinurl , since they're used in an application (launcher) and non-standard MS type.

Files that end in .url can be either the above or type text/x-uri. An example of the latter is /usr/share/gettext/projects/GNOME/teams.url, which is just a plain text file containing a url and nothing else. This is matched from /usr/share/globs2:

50:text/x-uri:*.url

So what we really have to do is make the [InternetShortcut] magic word override the .url glob when it exists. Currently it assumes text/x-uri whenever the glob is .url. If you change an MS URL file to a random extension, you'll see that it changes from "resource location" to "Internet shortcut".

I'm not sure how to make it override. "If the glob matching fails or results in multiple conflicting mimetypes, read the contents of the file and do magic sniffing on it."