Bug 78504 - incorrect handling of ungzipped .tgz archives
Summary: incorrect handling of ungzipped .tgz archives
Alias: None
Product: ark
Classification: Applications
Component: general (show other bugs)
Version: 2.1.9
Platform: Mandrake RPMs Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Helio Castro
Depends on:
Reported: 2004-03-26 18:36 UTC by Krzysztof Ciebiera
Modified: 2006-08-19 14:53 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Note You need to log in before you can comment on or make changes to this bug.
Description Krzysztof Ciebiera 2004-03-26 18:36:08 UTC
Version:           2.1.9 (using KDE KDE 3.2.1)
Installed from:    Mandrake RPMs
OS:          Linux

I have received a letter with .tgz attachment. It did open correctly in ark, but it didn't want to extract. It appeared that it was TAR archive with incorrect extention (.tgz instead of .tar). I have verified that if you make any .tgz tar archive it will open and display its content, but it will not extract.
Comment 1 Henrique Pinto 2004-03-30 02:26:20 UTC
CVS commit by pinto: 

Never ever rely on the filename to determine whether the archive is compressed or not.

CCMAIL: 78504-done@bugs.kde.org

  M +1 -1      tar.cpp

--- kdeutils/ark/tar.cpp  #1.24:
@@ -82,5 +82,5 @@ TarArch::TarArch( ArkSettings *_settings
     m_fileMimeType = _openAsMimeType;
     if ( m_fileMimeType.isNull() )
-        m_fileMimeType = KMimeType::findByPath( _filename )->name();
+        m_fileMimeType = KMimeType::findByFileContent( _filename )->name();
     kdDebug(1601) << "TarArch::TarArch:  mimetype is " << m_fileMimeType << endl;

Comment 2 ralf@skolelinux.de 2006-08-19 14:50:52 UTC
Hi there, I have a similiar problem with an tgz archive that works well with ark:

http://users.xplornet.com/~bvdp/mma/mma-html-0.22.tar.gz won't open wih 
ARK (all other archives work here) Downloading the file, let me browse 
and extract the archive with mc. So there seems to be another standard.

ark mma-html-0.22.tar.gz
kio (KMimeType): WARNING: mimetype not valid '' (missing entry in the file ?)
kio (KMimeType): WARNING: mimetype not valid '' (missing entry in the file ?)
kparts: WARNING: StatusBarExtension::removeStatusBarItem. Widget not found : [KPushButton pointer (0x8105658) to widget CancelButton, geometry=100x30+0+0]
knoppix@localhost:/tmp$ KTar: WARNING: KTar: invalid TAR file. Header is: utio

ark -v
Qt: 3.3.6
KDE: 3.5.3
Ark: 2.6.3
Comment 3 ralf@skolelinux.de 2006-08-19 14:53:05 UTC
Oops, I didn't see that this bug was closed. Shoul I reopen it or rather start a new thread?