Red Hat Bugzilla – Bug 427488
xdg-mime quits too easily when determining MIME type of file
Last modified: 2008-04-27 11:27:33 EDT
Description of problem:
Unix traditionally looks at the contents of a file instead of just its extension
when determining a file's MIME type. The xdg-mime utility does not do this -- it
seems to only look at the file's extension. This limits its usefulness.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
xdg-mime xdg-mime query filetype /etc/passwd
Program prints "application/octet-stream"
Should print "text/plain"
Adding the "--slow-mime" option to xdg-mime's use of gnomevfs-info solves this
See also https://bugs.freedesktop.org/show_bug.cgi?id=13919.
I don't see that on rawhide. I get:
$ xdg-mime query filetype /etc/passwd
I am under fluxbox with perl-File-MimeInfo installed.
Same here (in a DE-less terminal), could be gnomevfs-info simply returning the
wrong result here.
Wrt to use of --slow-mime. If you think that should be the default, I'd argue
1. you make that case with the maintainer of gnomevfs-info
2. make the case with xdg-utils upstream (which you already did). I'm
hesitant to diverge from upstream behavior here (yet).
Closing->Upstream, we'll continue to track this there.