Ticket #1392 (closed defect: fixed)

Opened 10 years ago

Last modified 10 years ago

Regression: mc can't open some .tar files

Reported by: vda Owned by: styx
Priority: major Milestone: 4.7.0-pre2
Component: mc-core Version: master
Keywords: Cc:
Blocked By: Blocking:
Branch state: Votes for changeset: slavazanko iNode

Description (last modified by styx) (diff)

Ironically, I see it when I try to open a tarfile of mc's own git tree. I create the tarball with:

tar cvf mc.tar --exclude '*/.git' mc

and when I press [enter] on mc.tar, it shows me empty list of files.

I will attach a smaller one, with most files deleted. It opens in 4.6.1 just fine.

changeset: ac2edf225e2dfa60804bf92b107fe240fe31e390

Attachments

mc.tar (91.0 KB) - added by vda 10 years ago.
test tarball

Change History

Changed 10 years ago by vda

test tarball

comment:1 Changed 10 years ago by andrew_b

  • Version 4.6.2 deleted

The bug is in get_compression_type() function. MC interprets the attached tar archive as LZMA-compressed file.

The first byte of file is 'm', and the following condition (src/util.c:888)

    if (magic[0] < 0xE1 || (magic[0] == 0xFF && magic[1] == 'L' &&
        magic[2] == 'Z' && magic[3] == 'M')) {

is true. That's wrong.

comment:2 follow-up: ↓ 3 Changed 10 years ago by andrew_b

This regression was introduced in changeset:a5ba27872979bc6a15418ec30d6d115e9ba92235.

comment:3 in reply to: ↑ 2 Changed 10 years ago by andrew_b

Replying to andrew_b:

This regression was introduced in changeset:a5ba27872979bc6a15418ec30d6d115e9ba92235.

#176

comment:4 Changed 10 years ago by andrew_b

  • Version set to master
  • Milestone changed from 4.7 to 4.7.0-pre1

comment:5 Changed 10 years ago by zaytsev

Aha, and you didn't believe me and blamed the tar & zip utilities. Glad we've got it fixed!

comment:6 Changed 10 years ago by angel_il

  • Milestone changed from 4.7.0-pre1 to 4.6.2.1

comment:7 Changed 10 years ago by angel_il

  • Milestone changed from 4.6.2.1 to 4.7.0-pre2

comment:8 Changed 10 years ago by styx

  • Status changed from new to accepted
  • Owner set to styx

comment:9 Changed 10 years ago by styx

Branch: 1392_tar_regression
Chageset: cd537722fdf5cede53cfefc545ceb14f3ca1308e

comment:10 Changed 10 years ago by styx

  • severity changed from no branch to on review

comment:11 Changed 10 years ago by slavazanko

  • Votes for changeset set to slavazanko

Good fix. Test arhive now opening.

comment:12 Changed 10 years ago by iNode

  • Votes for changeset changed from slavazanko to slavazanko iNode
  • severity changed from on review to approved

comment:13 Changed 10 years ago by styx

  • Status changed from accepted to testing
  • Resolution set to fixed
  • severity changed from approved to merged
  • Description modified (diff)

comment:14 Changed 10 years ago by styx

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