(*** This bug was imported into bugs.kde.org ***) Package: ark Version: v2.1.9 (using KDE 3.0.1 ) Severity: normal Installed from: Gentoo Compiler: gcc version 2.95.3 20010315 (release) OS: Linux (i686) release 2.4.19-gentoo-r7 OS/Compiler notes: Some websites will name a downloadable archive something other than .tar.gz or .tgz; for example "somefile.bin" or the name of the servlet sending the file. When this file is opened in Ark (through Konqueror) Ark refuses to open the file with a particularly bizarre message: "Gzip archives need to have the extension 'gz'." If it can determine (without the filename) that it is a GZip archive *why* will it not open it? There is *no* option to force it either. This forces the user to save the file somewhere rename it and then open Ark on it. This should be removed IMHO. Or at least an option to disable this check. -Andrew (Submitted via bugs.kde.org) (Called from KBugReport dialog)
This bug sucks! Our application creates gzip tar archives with extension tar.gz.aa Can't open them with kde. Although it finds out they archives. KDE 3.0.2
Still present in KDE-3.1b1
Some additional info: 1. The function ArkWidget::openArchive() outputs the error message, when Arch::archFactory() doesn't return a pointer to an Arch object. 2. The function Arch::archFactory() returns a NULL pointer, when Arch::getArchType() returns the enum value UNKNOWN_FORMAT. 3. I think the function Arch::getArchType() must probably change: if (mimetype == "application/x-jar") extType = ZIP_FORMAT; + if (mimetype == "application/x-gzip") + extType = COMPRESSED_FORMAT; } 4. There might be a problem with gzip tar archives not having the proper extension, because then extType needs to be TAR_FORMAT not COMPRESSED_FORMAT. This is probably the reason for this error message. Christian
+ if (mimetype == "application/x-gzip") // Assume tar-gzipped + extType = TAR_FORMAT; Sort of works but it is rather an ugly hack.
It's a requirement of gunzip software. severity is not so critial ( er.. Major ) Moved to minor
gunzip has switch -S .ending to try file with ending .ending, or -S "" to try to decompress all files regardless of ending. [gunzip 1.3.5 manpage in Debian] If the suffix is wrong, the return value is 2. If the ending is forced but the file is still in wrong format, the return value is 1. Would it be too difficult to implement this?
By the way Konqueror archive webpage creates tar.gz files with the extension .war so you can not open these files with ark either. Regular tar -zxf foo.war works fine though, so imho this bug should be fixed.
Well.. Let's explain what's happenig... In a time before, ark is using the stupid gzip requires to end in .gz. Yes, if we pass an option we can solve part of problem, but not entirely. So, Georg Robbers and I, works at same time on problem and got the same result trying figure out file type. Every attempt to detect file type as .gtar, .tgz , or even .war, or whatever name you want, they respond as a zip type file. So, even we uncompress this files, we leave a .tar file only, and we need recheck the file to "discover" that they are a tar file. Since this is an odd situation, because we really can't apply the second teste to every gz like file, we still trying to figure out the better solution to do that. Georg comes to a interesting solution a time ago, but they said that still having problems. So, this is one of the top bugs in the list to solve. If none of our tries work, i will use the second check solution anyway.. []'s
This bug has been fixed in CVS HEAD: - ark can now handle gzipped/bzipped/lzopped files without proper extensions - if you want ark to always recognize eg. tar.gz.aa files as tar.gz, simply add tar.gz.aa as possible extension for in kde's file associations - when opening a file with an unknown extension, ark still tries to autodetect the format, but offers the possibility to override that - you can force ark to open a file as a specified archive type