Cannot extract zip archive when filenames contain a \ character

Bug #320784 reported by Fabio Bossi
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
file-roller (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: file-roller

Some zip files (I suppose it also happens with other formats but I haven't tried yet) that can be downloaded from the Internet may contain files with the "\" character in their names instead of "/" in order to indicate that they are placed inside a directory. File-roller does not recognize this fact and interprets \ as the escape character. The result is a "caution: filename not matched" error when trying to extract the archive. A similar error occours with Ark in Kubuntu. The unzip command line tool instead outputs a warning but manages to extract the archive properly.

Revision history for this message
Michele Mangili (mangilimic) wrote :

Hi Fabio.

I suppose that this is a duplicate bug. Can you please give a look at bug number #294215 ? And tell me if that is the same issue.

Thank you.

Revision history for this message
Michele Mangili (mangilimic) wrote :
Revision history for this message
Fabio Bossi (fabio-bossi-deactivatedaccount) wrote :

It looks related, as it involves the handling of special characters. I don't know if it can be considered a duplicate though.

Revision history for this message
Michele Mangili (mangilimic) wrote :

Can you attach an example file, so that we can try to reproduce this bug?

Thank you

Revision history for this message
Fabio Bossi (fabio-bossi-deactivatedaccount) wrote :

Not right now. For the meantime, now that I think about it, this is not a duplicate as while the other bug is fixed this is obviously not, as my Ubuntu is completely updated.

Revision history for this message
Fabio Bossi (fabio-bossi-deactivatedaccount) wrote :

I've been able to create such a file file manually.

Of course we have ambiguity here, as the \ character could be both a directory separator or part of the filename. In all cases, the archive should at least extract.

Revision history for this message
Michele Mangili (mangilimic) wrote :

I couldn't extract that file using file-roller 2.24.1-0ubuntu2 (which is affected by bug #294215 ) but I was able to extract it with file-roller 2.25.2-0ubuntu1.
file-roller extracted a file with name "mydirectory\myfile" and it didn't create the directory "mydirectory" .

Which version of file-roller are you using?

I think that the example you have provided is a duplicate of bug #294215 . In fact the archive you have posted contains a file which filename is "mydirectory\myfile". So the filename contains a "\" (backslash) character. As you can read here: http://bugzilla.gnome.org/show_bug.cgi?id=559481 (this is the upstream report for #294215) special characters in filenames are "[]*?!^-\" and backslash is included. At the same time I suppose that the backslash character is not a directory separator when used in the filename. It must be a character which belongs to the name of a file and it doesn't represent a directory, although I don't know the zip file format, so I'm not sure.

I understand that your bug report pointed out that the character '\' could be used to represent a sub-directory in an archive (e.g. a .zip file) instead of using the character '/'.

We'd be grateful if you would then provide an archive in which the "\" character in the name of a file is used to represent that the file is placed inside a directory, so that we can reproduce this bug.

Changed in file-roller:
status: New → Incomplete
Revision history for this message
Fabio Bossi (fabio-bossi-deactivatedaccount) wrote :

I'm still using 2.24.1 on Ubuntu 8.10, but update manager says that there are no updates avaiable. As for the file, I need access to another machine which i don't have right now. I'll try as soon as possible.

Revision history for this message
Michele Mangili (mangilimic) wrote : Re: [Bug 320784] Re: Cannot extract zip archive when filenames contain a \ character

Fabio ha scritto:
> I'm still using 2.24.1 on Ubuntu 8.10, but update manager says that
> there are no updates avaiable.

At the moment, the new version of file-roller is not available for 8.10.
However you can download it from [1].

It is quite easy to install and it works great if you are using Ubuntu
8.10 .

Thank you.

[1] http://packages.ubuntu.com/jaunty/file-roller

Revision history for this message
Fabio Bossi (fabio-bossi-deactivatedaccount) wrote :

I've finally found a file that uses \ as a directory separator and shouldn't have any copyright issue.

The bug is not a problem for me as I can extract from command line, but I thought that new users may be pissed off if they encounter this issue. Please check if the file extracts with the latest file-roller.

Revision history for this message
Michele Mangili (mangilimic) wrote :

Thank you Fabio for your quick response.

I couldn't extract file MBTI.zip using file-roller 2.24.1-0ubuntu2, but I was able to extract it with file-roller 2.25.2-0ubuntu1.

file-roller 2.25.2-0ubuntu1 created the correct directory tree and put all the files in the right place!

Indeed I think that it is possible to mark this report with status "Fix Released".

Thanks for taking the time to make Ubuntu better!

Changed in file-roller:
status: Incomplete → Fix Released
Revision history for this message
Narcis Garcia (narcisgarcia) wrote :

Fileroller 2.26.1 in Xubuntu 9.04: I try to extract a .zip package containing subdirectory structure in the file names (as it shows Fileroller).

- If I extract it in a FAT volume, returns:
7-Zip 4.58 beta Copyright (c) 1999-2008 Igor Pavlov 2008-05-05
p7zip Version 4.58 (locale=ca_ES.UTF-8,Utf16=on,HugeFiles=on,1 CPU)

Processing archive: /mnt/fat32volume/mypackage

Extracting firstfile.xml
can not open output file /mnt/fat32volume/SUBDIR\FIRSTFILE.XML
can not open output file /mnt/fat32volume/SUBDIR\SECONDFILE.XML
...
...
...
Sub items Errors: 25

- If I extract it in Ext3 volume, extracts the files with names as "SUBDIR\FIRSTFILE.XML", "SUBDIR\SECONDFILE.XML", and without creating any subdirectory.

Revision history for this message
Pedro Villavicencio (pedro) wrote :

Could you reproduce that with Karmic Actiu? If so please open a new bug report about it, thanks.

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.