Bug 8286 - application/x-chess-pgn should be listed as a subclass or text/plain
Summary: application/x-chess-pgn should be listed as a subclass or text/plain
Status: RESOLVED FIXED
Alias: None
Product: shared-mime-info
Classification: Unclassified
Component: freedesktop.org.xml (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Jonathan Blandford
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-15 06:29 UTC by Sebastien Bacher
Modified: 2007-02-05 07:25 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Sebastien Bacher 2006-09-15 06:29:38 UTC
That bug has been described on
https://launchpad.net/distros/ubuntu/+source/shared-mime-info/+bug/60095

"Nautilus does not correctly identify PGN (portable game notation) files.

To reproduce save the following as foo.pgn:
<snip>
[Event "Local chess game"]
[Site "?"]
[Date "????.??.??"]
[Round "?"]
[White "White"]
[Black "Black"]
[Result "*"]

1. e4 d5 2. exd5 Na6 3. Bb5+ *
</snip>

Browsing with Nautilus will display a thumbnail of the text of the file and
right-clicking to get the file properties will show the MIME type as text/plain.

However /usr/share/mime/packages/freedesktop.org.xml has an entry for .pgn files:
<snip>
  <mime-type type="application/x-chess-pgn">
    <comment>PGN chess game</comment>
    <glob pattern="*.pgn"/>
  </mime-type>
</snip>

If you edit this file and add <sub-class-of type="text/plain"/> after running
update-mime-database then nautilus identifies correctly.

Now, I am unsure if this is a bug in shared-mime-info or nautilus or both. PGN
is a sub-type of text/plain, however there is nothing ambiguous about the .pgn
glob matching.

I am using Ubuntu Dapper (nautilus 2.14.3-0ubuntu1, shared-mime-info
0.17-0ubuntu11)"
Comment 1 Daniel Borgmann 2006-09-17 14:14:27 UTC
Additionally I wonder if the description shouldn't be changed to something like
"PGN chess games" or "PGN chess game notations", since PGN files usually include
a collection of games.
Comment 2 Bastien Nocera 2007-02-05 07:25:17 UTC
2007-02-05  Bastien Nocera  <hadess@hadess.net>

        * freedesktop.org.xml.in: Add magic for the PGN mime-type,
        make it a text/plain sub-class, change the human-readable name
        to "PGN chess game notation" (Closes: #8286)


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.