Red Hat Bugzilla – Bug 169633
file-roller doesn't detect mime type correctly if file suffix is in caps
Last modified: 2012-06-20 12:04:25 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050921 Red Hat/1.0.7-1.4.1 Firefox/1.0.7
Description of problem:
When opening a file directly from inside an archive, file-roller doesn't detect the associated mime-type of files where the file suffix is in caps. For example opening a file ending with mydoc.ppt works as expected, but mydoc.PPT only pops up the "what application to use for opening files of this type" window.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. echo "some text" > tryme.TXT
2. zip tryme.zip tryme.TXT
3. file-roller tryme.zip
4. double-click tryme.TXT in the file roller window
Actual Results: file-roller brings up "open files" window with zero available applications listed for that file.
Expected Results: It should launch a text editor or viewer.
Created attachment 119470 [details]
One-liner patch to fix the issue
The attached one-liner does the mimetype matching against lowercased string so
the correct application for that mimetype is found.
Oh, doh. Should use g_utf8_strlen() instead of just strlen()... eg:
mime_type = gnome_vfs_mime_type_from_name_or_default (g_utf8_strdown(filename,
g_utf8_strlen(filename, -1)), NULL);
Thank you for submitting this issue for consideration in Red Hat Enterprise Linux. The release for which you requested us to review is now End of Life.
Please See https://access.redhat.com/support/policy/updates/errata/
If you would like Red Hat to re-consider your feature request for an active release, please re-open the request via appropriate support channels and provide additional supporting details about the importance of this issue.