Ticket #3433 (closed defect: fixed)

Opened 5 years ago

Last modified 4 years ago

cd into zip file fail with "inconsistent extfs archive"

Reported by: fubbes Owned by: andrew_b
Priority: major Milestone: 4.8.16
Component: mc-vfs Version: 4.8.14
Keywords: extfs uzip Cc:
Blocked By: Blocking:
Branch state: merged Votes for changeset: committed-master

Description

It's not possible to cd into some zip files. This happen only for specific ones.

After some investigations it seems mc isn't able to handle zip files with entries which have broken Unix file attributes. Whereas the zip file itself can be extracted without any problem.

zip with valid Unix permissions

$ /usr/lib/mc/extfs.d/uzip list foo.zip
drwxrwxrwx 1 1000 1000 0 03/27/2015 04:39:26 addons/
$ zipinfo foo.zip | grep Unix
file system or operating system of origin: Unix
Unix file attributes (040777 octal): drwxrwxrwx

zip with invalid Unix permissions

$ /usr/lib/mc/extfs.d/uzip list foo_broken.zip
?rwsrwsrwt 1 1000 1000 0 03/27/2015 04:39:26 addons/
$ zipinfo foo_broken.zip | grep Unix
file system or operating system of origin: Unix
Unix file attributes (177777 octal): ?rwsrwsrwt

issue is also on github: https://github.com/MidnightCommander/mc/issues/55

Attachments

foo.zip (112 bytes) - added by fubbes 5 years ago.
foo_broken.zip (112 bytes) - added by fubbes 5 years ago.
mc-3433-extfs-uzip-adjust-abnormal-directory-permission.patch (1.3 KB) - added by and 4 years ago.

Change History

Changed 5 years ago by fubbes

Changed 5 years ago by fubbes

comment:1 Changed 5 years ago by andrew_b

  • Component changed from mc-core to mc-vfs

comment:2 Changed 4 years ago by and

Thanks fubbes and/or SubOptimal? for reporting.
unzip handled object as directory if filename ended with '/'
it will not depend on given file permission

So zipinfo can show strange perms but unzip can handle it.

patch attached.

comment:3 Changed 4 years ago by and

  • Milestone changed from Future Releases to 4.8.16

comment:4 Changed 4 years ago by andrew_b

  • Status changed from new to accepted
  • Owner set to andrew_b
  • Branch state changed from no branch to on review

comment:5 Changed 4 years ago by andrew_b

  • Votes for changeset set to andrew_b
  • Branch state changed from on review to approved

comment:6 Changed 4 years ago by andrew_b

  • Status changed from accepted to testing
  • Votes for changeset changed from andrew_b to committed-master
  • Resolution set to fixed
  • Branch state changed from approved to merged

comment:7 Changed 4 years ago by andrew_b

  • Status changed from testing to closed
Note: See TracTickets for help on using tickets.