-
-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot extract tar.gz #206
Comments
So the file probably really is not a tar format. |
@smiddy - do you have the file in question so that we can test it? |
Unfortunately, there is some sensitive data in the archive. I think i produced it once on my CentOs mashine as well. @vkareh should I try to produce a tar.gz archive which resultstin the error? |
@smiddy, yes please. That would be very helpful. Any file that fails like that would work for me, just make sure that it only fails in engrampa (file-roller and |
This error occurs when the file is not the same format as extension supposed. Just check it with The error should be reproducible with the attached file! |
Tar cannot open this file, I got
So either the file is bad(most likely) or there is a problem in tar itself. I don't know if there is some new kind of tar archive that is not supported by even the tar version shipped now in Debian Unstable, or if there are some random problems where the problem archives are first being made. |
I would say that if @cranes-bill - how did you create this file? |
okay, I renamed this file to |
Well, i know my English is terrible, sorry about that, but what is not clear here!? The file just is not a TAR. It was intended to produce this error, in order to illustrate the error is always reproducible when the file is wrongly recognized. |
Confirmed: if named readme.zip it opens. I have engrampa built with libmagic support (note that it can also be built without it) |
I also use the |
So the problem is only when the file has |
@cranes-bill: not entirely accurate, I think... if I rename the file as |
Actually i added some "debug" messages and noticed that it uses |
I could reproduce the error with both archives:
Same error for my own archive. Interesting: When I use File Roller 3.22.3 I can open my archive, but not your README.tar.gz When I rename the archive to README.zip, I cannot open it with Engrampa or File Roller |
@smiddy What is the output from the following command: |
I had to download the file from our server again (new copy) For file |
So the file for sure is gzip and the situation is as i supposed. If you rename it to *.gz, you should be able to open it with Engrampa. By the way, i found a way how to always use |
@cranes-bill - how do you force engrampa to always use libmagic? |
@vkareh Not sure that is the right solution, but works perfect to me: src/fr-archive.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/fr-archive.c b/src/fr-archive.c
index fcb4c82..0993d0c 100644
--- a/src/fr-archive.c
+++ b/src/fr-archive.c
@@ -1146,7 +1146,11 @@ load_local_archive (FrArchive *archive,
old_command = archive->command;
+#if ENABLE_MAGIC
+ mime_type = get_mime_type_from_magic_numbers (archive->local_copy);
+#else
mime_type = get_mime_type_from_filename (archive->local_copy);
+#endif
if (! create_command_to_load_archive (archive, mime_type)) {
mime_type = get_mime_type_from_content (archive->local_copy);
if (! create_command_to_load_archive (archive, mime_type)) { |
@cranes-bill - nice, I'll give this a try |
Expected behaviour
Having an archive archive.tar.gz and extract it.
Actual behaviour
I get the error:
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Exiting with failure status due to previous errors
Steps to reproduce the behaviour
The error does not occur on all tar.gz. files. E.g., when I create an archive with engrampa, I can extract it afterwards.
The archive itself is o.k, I extracted it on a CentOS 7 mashine with a different program.
MATE general version
1.20
Package version
1.20
Linux Distribution
Xubuntu 18.04 64bit
Link to downstream report of your Distribution
The text was updated successfully, but these errors were encountered: