Bug 18863 - application/msword-template is too vague
Summary: application/msword-template is too vague
Status: RESOLVED FIXED
Alias: None
Product: shared-mime-info
Classification: Unclassified
Component: freedesktop.org.xml (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Jonathan Blandford
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-03 05:08 UTC by Stanislav Brabec
Modified: 2009-02-17 01:37 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Stanislav Brabec 2008-12-03 05:08:09 UTC
foo.dot can be a Word template or a Graphviz file.

Current share-mime-info now recognizes both as application/msword-template.

Magic is required.

For Graphviz files, first non-comment line should be in form:
graph .* {
or
digraph .* {

I don't know the magic for application/msword-template.
Comment 1 David Faure 2008-12-03 05:19:55 UTC
But I did add magic for graphviz already, when fixing #15363...

  <mime-type type="text/vnd.graphviz">
    <_comment>Graphviz DOT graph</_comment>
    <generic-icon name="x-office-document"/>
    <magic priority="50">
      <match type="string" value="digraph " offset="0:256"/>
      <match type="string" value="strict digraph " offset="0:256"/>
      <match type="string" value="graph " offset="0:256"/>
      <match type="string" value="strict graph " offset="0:256"/>
    </magic>
    <glob pattern="*.gv"/>
    <glob pattern="*.dot"/>
  </mime-type>

I guess when you say "current" you mean last released version?
I fixed this on 2008-10-17, I don't think there has been a release since then.
Comment 2 Stanislav Brabec 2008-12-03 05:34:02 UTC
Sorry, not current, but shared-mime-info-0.51.
Comment 3 David Faure 2008-12-12 10:55:26 UTC
Bastien, can you make a new shared-mime-info release?
Comment 4 Bastien Nocera 2008-12-19 09:19:43 UTC
Nope, not releasing until the test suite is fixed:
test-template.dot, 'file' test: expected application/msword-template, got application/x-msi
Comment 5 Bastien Nocera 2009-02-09 07:01:08 UTC
* tests/list: MS Office apps suck, we're not expected to recognise
a template file by magic (Closes: #18863)
Comment 6 David Faure 2009-02-17 01:37:40 UTC
Hmm, you took the easy way out, marking the test as "expected to fail".
I disagree that we can't recognize a template file when using both magic and extension. This is bug 18109: when a conflicting extension is used (*.dot is used by two mimetypes), sniffing is performed, but then the result of the sniffing should be used to determine which of the *initial* mimetypes (from the extension match) should be used. Since application/msword-template derives from ole-storage, if ole-storage magic matches then the final mimetype is application/msword-template. This was discussed on the xdg list but is not implemented in xdgmime yet.

I'm not reopening this bug since 18109 is already open on this topic though.


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.