Bug 45446 - stupidly requires gzip archives to end in .gz
Summary: stupidly requires gzip archives to end in .gz
Status: RESOLVED FIXED
Alias: None
Product: ark
Classification: Applications
Component: general (show other bugs)
Version: 2.1.9
Platform: Gentoo Packages Linux
: NOR minor
Target Milestone: ---
Assignee: Helio Castro
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-07-18 15:48 UTC by andrew
Modified: 2003-04-30 17:49 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description andrew 2002-07-18 15:43:03 UTC
(*** 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)
Comment 1 Steven Enderle 2002-09-18 14:30:01 UTC
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
Comment 2 Moritz Moeller-Herrmann 2002-10-01 22:25:09 UTC
Still present in KDE-3.1b1 
Comment 3 Christian Loose 2002-10-22 13:54:15 UTC
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

Comment 4 Waldo Bastian 2002-11-25 22:50:03 UTC
+    if (mimetype == "application/x-gzip") // Assume tar-gzipped
+      extType = TAR_FORMAT;

Sort of works but it is rather an ugly hack.
Comment 5 Helio Chissini de Castro 2003-03-07 21:55:02 UTC
It's a requirement of gunzip software. 
severity is not so critial ( er.. Major ) 
Moved to minor 
Comment 6 eekaikko 2003-03-07 23:24:34 UTC
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? 
Comment 7 ccheney 2003-04-15 00:18:24 UTC
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. 
Comment 8 Helio Chissini de Castro 2003-04-15 00:27:31 UTC
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 
 
 
Comment 9 Georg Robbers 2003-04-30 17:49:45 UTC
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