Edgewall Software
Modify

Opened 20 years ago

Closed 20 years ago

Last modified 20 years ago

#1568 closed enhancement (fixed)

Case sensitive mime types

Reported by: PBruin Owned by: Jonas Borgström
Priority: low Milestone: 0.9
Component: version control/browser Version: devel
Severity: normal Keywords: browser, case sensitive, mimeview
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

My company still uses a lot of legacy code that has filenames like FILE1.C and FILE1.H. This means that the mimeview api does not recognize them as c files. Can you include the following patch in the trunk so the mimeview api becomes case insensitive?

Index: api.py
===================================================================
--- api.py	(revision 1682)
+++ api.py	(working copy)
@@ -92,6 +92,7 @@
     try:
         i = filename.rfind('.')
         suffix = filename[i+1:]
+        suffix = suffix.lower()
         return MIME_MAP[suffix]
     except KeyError:
         import mimetypes

Thanks.

Attachments (0)

Change History (2)

comment:1 by Matthew Good, 20 years ago

Resolution: fixed
Status: newclosed

Actually, as mrowe informed me, the uppercase ".C" and ".H" are actually considered to be C++ extensions, not C (see http://www.saugus.net/Computer/Extensions/).

In [1684] I added these extensions to the mime-map as C++ mappings, but the parsing for C++ should also work on C code, so your files should be highlighted properly.

comment:2 by PBruin, 20 years ago

Ok, thanks.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.