Bug 39166

Summary: For xdg-mime query filetype, use file --mime-type, not file -i
Product: Portland Reporter: Reuben Thomas <rrt>
Component: xdg-utilsAssignee: Portland Bugs <portland-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: 1.1.0 rc1   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Reuben Thomas 2011-07-12 03:44:48 UTC
file -i prints a string like "text/plain; charset=utf-8", while xdg-mime is supposed to return just a MIME type, i.e. "text/plain". file --mime-type prints just the required information.

(I'm a maintainer of file, so feel free to ask for clarification of file's operation if you need it.)
Comment 1 Rex Dieter 2011-07-13 12:18:49 UTC
Cool, thanks!

commit 01b74b7a1bcf4ac84feec89e02a360ce03e2e450
Author: Rex Dieter <rdieter@fedoraproject.org>
Date:   Wed Jul 13 14:18:08 2011 -0500

    * xdg-mime : use 'file --mime-type' instead of 'file -i' (BR39166)

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.