Ticket #62 (new defect)

Opened 12 years ago

Last modified 13 months ago

savannah: MC fail to notice when archive is replaced

Reported by: bilboq Owned by:
Priority: major Milestone: Future Releases
Component: mc-vfs Version: master
Keywords: Cc: tux@…, rehak.michal@…, ip1024@…, zaytsev, Curtis@…, gotar@…, howaboutsynergy@…
Blocked By: Blocking:
Branch state: no branch Votes for changeset:

Description (last modified by ossi) (diff)

Original: http://savannah.gnu.org/bugs/?19328

Submitted by:Martin Petricek <bilboq>Submitted on:Fri 16 Mar 2007 10:45:16 PM UTC
Category:VFSSeverity:3 - Normal
Assigned to:NoneOpen/Closed:Open
Release:current (CVS or snapshot)Operating System:GNU/Linux

Original submission:

When .tar.bz2 archive is replaced, VFS in MC fails to notice it.
If you pack some files, examine the archive, then repack the archive
with different files, you see still old files.

How to reproduce:

Create two valid archives with distinct content (does not matter 
what content, just it have to be distinct files):
a.tar.bz2 and b.tar.bz2

Now move cursor to a.tar.bz2 and press enter. You see the contents. 
Fine, now go back, delete a.tar.bz2 and rename b.tar.bz2 to 
a.tar.bz2. Move to a.tar.bz2 (which is actually a renamed b.tar.bz2)
and press enter. You will see cached content of previous a.tar.bz2 
and you can even extract the files, even though the archive is 
deleted (I suppose a copy lives in /tmp or in memory)

Suggested fix: check date and size of archive when entering it. If 
it does not match, re-read the archive. This should fix most of the 
Clean, but maybe slower solution is to re-read archive every time it
is entered.

I suppose this bug may also affect other archive types (.tar.gz?), 
though I have not tested it.

Comment 1 by Vladimir Nadvornik <nadvornik> at Fri 18 May 2007 01:51:04 PM UTC:

Some VFS (for example tar and cpio) can detect changed archives,
others (bzip, extfs) can't. There is no consistent support of change
detection in VFS.

Change History

comment:1 Changed 12 years ago by metux

Also affects packagers like dpkg.

comment:2 Changed 11 years ago by styx

  • Milestone set to future releases

comment:3 Changed 11 years ago by bilbo

  • Cc tux@… added
  • severity set to no branch

comment:4 Changed 11 years ago by michal.rehak

  • Cc rehak.michal@… added

comment:5 Changed 10 years ago by igorp1024

  • Cc ip1024@… added

comment:6 Changed 10 years ago by andrew_b

  • Version set to master

comment:7 Changed 10 years ago by zaytsev

  • Cc zaytsev added

comment:8 Changed 10 years ago by zaytsev

Also affects PATCHFS :(

comment:9 Changed 10 years ago by zaytsev

  • Milestone changed from Future Releases to 4.8

See duplicate #349 for an idea on how to solve this problem.

comment:10 Changed 9 years ago by curtis

  • Cc Curtis@… added

And duplicate #2494 with cpio.rpm test case.

comment:11 Changed 9 years ago by gotar

  • Cc gotar@… added

comment:12 Changed 9 years ago by slavazanko

  • Branch state set to no branch

Closely related to #2454

comment:13 Changed 9 years ago by slavazanko

  • Blocked By 2695 added

comment:14 Changed 8 years ago by slavazanko

  • Blocked By 2695 removed

(In #2695) Merged to master:

git log --pretty=oneline 963ee34...4047403

comment:15 Changed 7 years ago by ossi

  • Description modified (diff)
  • Reporter changed from slavazanko to bilboq

comment:16 Changed 5 years ago by andrew_b

  • Milestone changed from 4.8 to Future Releases

comment:17 Changed 4 years ago by andrew_b

Related to #2454.

comment:18 Changed 3 years ago by egmont

Ticket #3875 has been marked as a duplicate of this ticket.

comment:19 Changed 13 months ago by howaboutsynergy

  • Cc howaboutsynergy@… added

comment:20 Changed 13 months ago by howaboutsynergy

This affects zip archives:

  1. look with mc into a .zip file, see its contents
  2. modify zip file contents by running whatever zip command to add/delete files
  3. look again into the same .zip file => no changes are seen, looks the same as in step 1.

to fix, exit mc so that it forgets the cache, or move the .zip file to a new dir before looking inside it again.

Is there any way to disable this cache completely?

comment:21 follow-up: ↓ 22 Changed 13 months ago by zaytsev

FWIW, you don't have to exit mc completely - you can force close the VFS.

comment:22 in reply to: ↑ 21 Changed 13 months ago by howaboutsynergy

Replying to zaytsev:

FWIW, you don't have to exit mc completely - you can force close the VFS.

Thank you for that, I had no idea that was a thing:

  1. first stop viewving archive contents by chdir-ing outside of it
  2. Command->Active VFS List->Free VFSs now
  3. re-enter archive - it's all updated now!

Great workaround! Cheers my friend!

Note: See TracTickets for help on using tickets.