Bug 169633 - file-roller doesn't detect mime type correctly if file suffix is in caps
file-roller doesn't detect mime type correctly if file suffix is in caps
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: file-roller (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Marina Zhurakhinskaya
Depends On:
  Show dependency treegraph
Reported: 2005-09-30 10:24 EDT by Panu Matilainen
Modified: 2012-06-20 12:04 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-06-20 12:04:25 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
One-liner patch to fix the issue (490 bytes, patch)
2005-09-30 10:27 EDT, Panu Matilainen
no flags Details | Diff

  None (edit)
Description Panu Matilainen 2005-09-30 10:24:46 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):

How reproducible:

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.

Additional info:
Comment 1 Panu Matilainen 2005-09-30 10:27:10 EDT
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.
Comment 2 Panu Matilainen 2005-09-30 10:37:28 EDT
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);
Comment 3 Jiri Pallich 2012-06-20 12:04:25 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.