Bug 427488 - xdg-mime quits too easily when determining MIME type of file
xdg-mime quits too easily when determining MIME type of file
Product: Fedora
Classification: Fedora
Component: xdg-utils (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Rex Dieter
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-01-04 00:29 EST by W. Michael Petullo
Modified: 2008-04-27 11:27 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-04-27 11:27:33 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
FreeDesktop.org 13919 None None None Never

  None (edit)
Description W. Michael Petullo 2008-01-04 00:29:58 EST
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):

How reproducible:
Every time

Steps to Reproduce:
xdg-mime xdg-mime query filetype /etc/passwd
Actual results:
Program prints "application/octet-stream"

Expected results:
Should print "text/plain"

Additional info:
Adding the "--slow-mime" option to xdg-mime's use of gnomevfs-info solves this
Comment 1 W. Michael Petullo 2008-01-04 00:38:58 EST
See also https://bugs.freedesktop.org/show_bug.cgi?id=13919.
Comment 2 Patrice Dumas 2008-04-27 09:56:15 EDT
I don't see that on rawhide. I get:

$ xdg-mime query filetype /etc/passwd
text/plain charset=us-ascii

I am under fluxbox with perl-File-MimeInfo installed.
Comment 3 Rex Dieter 2008-04-27 11:27:33 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.