Ticket #4513 (new defect)

Opened 8 months ago

Last modified 8 months ago

Wrong tar extraction

Reported by: fraganestis Owned by:
Priority: major Milestone: Future Releases
Component: mc-vfs Version: master
Keywords: Cc:
Blocked By: Blocking:
Branch state: no branch Votes for changeset:


You can add (using tar -r) in a tar file multiple files with the same name (or multiple versions of the same file).
When such tar file is opened in mc, every 'instance' of these entries (or occurrences as the tar help refers to them) is listed.
But when you copy or view such an occurrence, no matter which one you select, always the same file is displayed/copied.

Steps to reproduce:
1) create a file named sample1.txt with the following contents

Text line v1

2) execute

tar -rf test.tar sample1.txt

3) modify the sample1.txt to have the following contents

Text line v2

4) execute

tar -rf test.tar sample1.txt

5) open the test.tar using mc

6) view(F3) or copy (F5) each file.
The files will be identical

Expected behavior:
The newer file should reflect the modified state of the sample1.txt while the old should reflect the initial.

To correctly view the 'instances' of the file using tar, you can run

tar -xf test.tar sample1.txt -O --occurrence=1

for the initial version

tar -xf test.tar sample1.txt -O --occurrence=2

for the new version

Change History

comment:1 Changed 8 months ago by andrew_b

  • Component changed from mc-core to mc-vfs
Note: See TracTickets for help on using tickets.