Downloaded some docs from a server and they had .DOC and .XLS file names which the GNOME mime handlers didn't recognize. We should treat upper and lower case the same when it comes to file types I guess. There's a lot of cameras that save stuff with all upper case filenames too, and that makes it a royal PITA to manage the pictures after downloading them to the computer.
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
*** Bug 888 has been marked as a duplicate of this bug. ***
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.