After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 539727 - file-roller displays file types different to the ones used for opening the files
file-roller displays file types different to the ones used for opening the files
Status: RESOLVED DUPLICATE of bug 539720
Product: file-roller
Classification: Applications
Component: general
2.22.x
Other All
: Normal minor
: ---
Assigned To: Paolo Bacchilega
file-roller-maint
Depends on:
Blocks:
 
 
Reported: 2008-06-23 10:59 UTC by Martin Schwenke
Modified: 2008-06-25 08:15 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22



Description Martin Schwenke 2008-06-23 10:59:26 UTC
I create a file called a.txt containing the following text:

From foo
Path: bar

I add it to a zip archive using file-roller.  The type displayed in file-roller is "plain text document".  However, I can't open the file because there is no default application for the corresponding MIME type:

$ file -i a.txt
a.txt: text/x-news; charset=us-ascii

This would lead a novice user to believe that you can't open plain text documents from file-roller!

If the file type shown by file-roller corresponded to a MIME type (e.g. output of the "file" command) then that might convince the user they're dealing with something a little more exotic:

$ file a.txt
a.txt: ASCII news text

What's more, if I rename the file to a.c then file-roller reports it as "C source code".  This shows that file-roller reports the file type based purely on extension.

This makes it very difficult to form a usage model that explains why one plain text document can be opened from file-roller but another produced a curious dialog box that lists no available applications for opening the selected file!

Other information:
See also http://bugzilla.gnome.org/show_bug.cgi?id=539720 where I can't even create an association for the file in question!
Comment 1 Paolo Bacchilega 2008-06-24 10:07:49 UTC
file-roller just tries to open the file with the default associated application, so if you fix the problem described in bug #539720 you'll fix this problem too, closing as a dup...

*** This bug has been marked as a duplicate of 539720 ***
Comment 2 Martin Schwenke 2008-06-24 23:33:00 UTC
Ummm, no!  The bug reported here is a usability problem.  file-roller reports the file type according to the filename extension and then tries to open the file according to a completely different scheme.

So, in this bug I'm not concerned about not being able to open certain files.  I'm concerned that file-roller displays a misleading file type and it may be able to open one file of a particular displayed type but not another file of the same displayed type.  This makes it very difficult for a user to discover why they can easily open one file but not another.

In the example above, file-roller reports 2 files as "plain text document".  However, when it tries to open them it tries to open both of them as more exotic file types than just "plain text".

Instead of using the extension, file-roller should use libmagic (or whatever gnome-open uses to determine the MIME type) to get the text for the file type.

Alternatively, gnome-open could just use filename extensions to determine file types... but I think that would suck.  :-)

peace & happiness,
martin
Comment 3 Paolo Bacchilega 2008-06-25 08:06:37 UTC
then it's a dup of bug #126130
Comment 4 Martin Schwenke 2008-06-25 08:15:06 UTC
Definitely!  Sorry, I didn't notice that one...