Bug 6743 - fix for C-like source code MIME types
Summary: fix for C-like source code MIME types
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: patch
Depends on:
Blocks:
 
Reported: 2006-04-26 02:05 UTC by Stanislav Brabec
Modified: 2006-05-14 03:59 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
shared-mime-info-csrc.patch (2.69 KB, patch)
2006-04-26 02:05 UTC, Stanislav Brabec
Details | Splinter Review

Description Stanislav Brabec 2006-04-26 02:05:25 UTC
Problem:

C source code definition in shared-mime-info-0.17 contains vague magic. Other
C-like source codes fit these MIME types, and this fact causes MIME type
conflict between content MIME type and suffix MIME type and it causes security
warning in Nautilus.

Possible fixes:

- Remove this vague magic. (C source code without suffix will not be recognized)

- Define C-like MIME types as sub-class-of C source. (Any C-like source code
without proper suffix will be recognized as C source. Code with proper suffix
will be recognized exactly.)

Proposed patch uses the second way. It does:

Defines all C-like (header and source) MIME types as sub-class-of "C source
code" (with exception of C++ header, which is defined as sub-class of C header).

Moves *.h++ and *.hp from C header to C++ header.

Removes now obsolete duplicated magic definitions and keeps only unique ones.

Decreases priority of "/*" and "//" to prevent previous XPM high-priority
problem (just fixed) and future problems.
Comment 1 Stanislav Brabec 2006-04-26 02:05:53 UTC
Created attachment 5473 [details] [review]
shared-mime-info-csrc.patch
Comment 2 Bastien Nocera 2006-05-14 20:59:49 UTC
2006-05-14  Bastien Nocera  <hadess@hadess.net>

        * freedesktop.org.xml.in: patch from Stanislav Brabec <sbrabec@suse.cz>
        to clarify C, C++, C# and ObjC headers and sources (Closes: #6743)


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.