using the filename to get the mimetype is not always correct

Bug #26662 reported by Juanjo Garcia-Ripoll
120
This bug affects 10 people
Affects Status Importance Assigned to Milestone
File Roller
Confirmed
Wishlist
file-roller (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

When opening a file with the extension .z file-roller checks for the presence of the compress and uncompress binaries. A normal Ubuntu includes uncompress via gzip, but not compress. When file-roller can't locate compress, it refuses to open the .z file even though it is capable of uncompressing it.

Related branches

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks for your bug. That's known upstream:
http://bugzilla.gnome.org/show_bug.cgi?id=166603

Changed in file-roller:
status: Unconfirmed → Confirmed
Revision history for this message
Vassilis Pandis (pandisv) wrote :

Actually, this is not related to the upstream bug. AFAIK file-roller tries to uncompress .Z files using 'uncompress', which is not present. However gzip can handle such files. file-roller should use "gzip" to uncompress these files instead of "uncompress", and use "compress" to compress them.

Revision history for this message
Sebastien Bacher (seb128) wrote :

uncompress is shipped with the gzip package according to dlocate on my dapper installation

Changed in file-roller:
assignee: seb128 → desktop-bugs
Revision history for this message
Vassilis Pandis (pandisv) wrote :

You're right. file-roller actually looks for both compress and uncompress, while only the latter exists, even if all we want to do is uncompress. gzip doesn't handle compressing files to .Z format, only uncompressing them.

from src/fr-command-tar.c:

 if ((prog == FR_COMPRESS_PROGRAM_COMPRESS) &&
            ((!is_program_in_path("compress")) ||
             (!is_program_in_path("uncompress")))) {
                return NULL;
        }

Revision history for this message
Daniel Holbach (dholbach) wrote :

/usr/bin/compress is contained in ncompress (from Universe) - we could make file-roller Suggests it.

Changed in file-roller:
status: Confirmed → Fix Committed
Changed in file-roller:
status: Fix Committed → Confirmed
Changed in fileroller:
status: Rejected → Confirmed
Revision history for this message
Daniel Holbach (dholbach) wrote :

Does this still not work?

Revision history for this message
moma (osmoma) wrote :

Installation: Ubuntu Gutsy Gibbon, i386.

I want to confirm this bug.

I try to open tar.Z file but the GNOME's file-roller app does not understand the file format.

Trying to download the examples for O'Reilly's "XLib Programming Manual" book
from: http://examples.oreilly.com/v1/

Click on the tar.Z file name and GNOME's file-roller fails.
See this picture: http://www.futuredesktop.org/tmp/File-roller-tar.Z-error.png

Changed in file-roller:
status: Confirmed → Triaged
Revision history for this message
Adam Niedling (krychek) wrote :

Bug still exists in Hardy.

Revision history for this message
Brian Pitts (bpitts) wrote :

Could we remove the connection to gnome-bug-#126130? The problem isn't that file-roller misidentifies the file, the problem is that it checks for both compress and uncompress, when Ubuntu only includes uncompress by default.

description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package file-roller - 2.23.6-0ubuntu1

---------------
file-roller (2.23.6-0ubuntu1) intrepid; urgency=low

  * New upstream version:
    Bugs fixed:
    - #350640: sending an empty folder doesn't work. (lp: #55603)
    - #548020: "create archive" directory selection not working correctly.
        (lp: #230044)
    - #546698: file-roller-2.23.1/2.23.5 removes r/x bit for anyone but
               root from / (lp: #250021)
    - #547733: 7-zip tells about invalid command line
    - #547297: Crash reading zip/7za files with 7z version 4.55.
    - #546978: wrong icon for folders.
    - #547017: segfault in "Open with".
    - #546505: Debian packages not supported anymore. (lp: #258499)
    - #542424: Tar.bz2 archives create uncompressed archive files.
    - #546541: Typo and little errors in documentation.
    - LP#26662: file-roller fails to open .Z files. (lp: #26662)
  * debian/file-roller.mime:
    - new version update
  * debian/patches/70_autoconf.patch:
    - new version update

 -- Sebastien Bacher <email address hidden> Tue, 19 Aug 2008 09:37:02 +0200

Changed in file-roller:
status: Triaged → Fix Released
Changed in file-roller:
status: Fix Released → Triaged
Changed in file-roller:
importance: Unknown → Wishlist
Revision history for this message
Erik S (ofenfisch) wrote :

This bug still exists... try the following:

touch a.b
tar -cf aTarFile a.b

Now you have a "tar"-file. Trying to open it in file-roller will produce an error.

file aTarFile
> aTarFile: POSIX tar archive (GNU)

Renaming the archive to any uncompressable file-type (like *.zip, *.lzma, *.7z, ... or just *.tar) will give you a file which can now be opened by file-roller, even though this is "just" a tar-file.

Revision history for this message
b (ubuntuforum-bjopp) wrote :

I know this is an old thread, but this bug still exists in 3.10.2.1 as packaged for ubuntu 14.04 and linux mint 17.

Revision history for this message
Merlijn Sebrechts (merlijn-sebrechts) wrote :

I created a new issue for this: https://gitlab.gnome.org/GNOME/file-roller/issues/2

Although I'm not sure this issue and the new issue are related.

Changed in file-roller (Ubuntu):
status: Triaged → Fix Released
assignee: Ubuntu Desktop Bugs (desktop-bugs) → nobody
Revision history for this message
Merlijn Sebrechts (merlijn-sebrechts) wrote :

Marked as fix released because the original issue is fixed.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.