#479548 [VFS] tar archives show multiple entries if archive was created with --append/--update

Package:
mc
Source:
mc
Description:
Midnight Commander - a powerful file manager
Submitter:
Michelle Konzack
Date:
2010-08-15 13:03:06 UTC
Severity:
normal
Tags:
#479548#5
Date:
2008-05-04 15:24:21 UTC
From:
To:
Hello Maintainer,

if a TAR archive was created with the --append or  --update  option  and
someone use "mc" to look into the file, he/she will  encounter  multiple
directory and file entries and by selecting all of them for  extraction,
he/she will be warned for overwriting an already extracted file...

First I was looking into  "/usr/share/mc/extfs/utar"  but  it  does  not
exist (it is handled internaly) which mean, I can not send  a  patch  to
it.

Note:   I am working on a "tar" vfs which allow  --append  and  --update
        but it is  something  complicate  if  the  file  is  compressed.
        Unfortunately it will not be finished before  release  of  Lenny
        since because of my destructed appartement I am handicaped.

Thanks, Greetings and nice Day
    Michelle Konzack
    Systemadministrator
    24V Electronic Engineer
    Tamay Dogan Network
    Debian GNU/Linux Consultant

#479548#10
Date:
2008-05-09 21:03:29 UTC
From:
To:
OK, NOW I know the reason...

To reproduce it, put the following into the file
----[ '/usr/share/mc/extfs/foo' ]---------------------------------------
#!/bin/bash

if [ "$1" = "list" ] ; then

  echo "drwxrwxr-x  1 michelle.konzack private 96 05-09-2008 22:35 foo"
  echo "drwxrwxr-x  1 michelle.konzack private 96 05-09-2008 22:35 foo/bar"
  echo "-rwxrwxr-x  1 michelle.konzack private 96 05-09-2008 22:35 foo/bar/baz/test"
  echo "drwxrwxr-x  1 michelle.konzack private 96 05-09-2008 22:35 foo/bar/michelle"
  echo "drwxrwxr-x  1 michelle.konzack private 96 05-09-2008 22:35 foo/bar/pavel"

#  echo "drwxrwxr-x  1 michelle.konzack private 96 05-09-2008 22:35 foo/bar/baz"

fi
------------------------------------------------------------------------

then in
----[ '/usr/share/mc/extfs/extfs.ini' ]--------------------------------- # Michelles solutions foo ------------------------------------------------------------------------ then in
----[ '/usr/share/mc/mc.ext' ]------------------------------------------ shell/foo Open=%cd %p+foo ------------------------------------------------------------------------ and then do a touch foo leave "mc" and restart it. Now select the file and hit <ENTER>... You can go into "foo" and then "bar" and in the next you will see a directory "baz" which contain the file "test" This is something like a TAR file Now uncomment the last line and restart mc and go into the "foo" file. You can go into the "foo" directory and then "bar" and in the next you will see two directories "baz" which contain the file "test" How this can happen? If you tar a directory with tar -create -vv -file foo.tar foo which has the content foo" foo/bar" foo/bar/baz/test" foo/bar/pavel" foo/bar/michelle" and then later you do an update with tar -update -vv -file foo.tar foo and the directory foo/bar/baz is now empty, the empty directory will added in the "tar" index and produce this output I have submitted already a "tdmc_tar" EXTFS which correct this problem and add additional features. If you use the new "tdmc_tar" you can close this bug#. Thanks, Greetings and nice Day Michelle Konzack Systemadministrator 24V Electronic Engineer Tamay Dogan Network Debian GNU/Linux Consultant