Summary: | Mime system doesn't handle file types in upper case | ||
---|---|---|---|
Product: | xdgmime | Reporter: | Kjartan Maraas <kmaraas> |
Component: | xdgmime | Assignee: | Jonathan Blandford <jrb> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | high | CC: | archana.shah, vinay.mandyakoppal |
Version: | unspecified | ||
Hardware: | x86 (IA32) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
fix the "ignore case" case.
possible fix |
Description
Kjartan Maraas
2004-06-08 01:00:00 UTC
Reassigning to xdgmime, it's probably more appropriate there. *** Bug 1908 has been marked as a duplicate of this bug. *** This is a bug in xdgmime code. It is supposed to fallback to a case unsensitive match when it couldn't find an exact match, but it doesn't work. The problem is in _xdg_glob_hash_node_lookup_file_name. When doing a case unsensitive lookup, it assumes "_xdg_ucs4_to_upper (character)" will be greater than "character", which is not the case in ASCII, so the loop trying to match characters stops after processing upper case chars in the magic pattern, but before processing any lower case chars. The attached patch should fix that. Created attachment 1383 [details] [review] fix the "ignore case" case. Created attachment 1500 [details] [review] possible fix I was thinking to something like this. The idea is to follow the spec when it says to first do a case sensitive comparation and then convert the filename to lower case. checked in |
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.