Tars with ./files in the root



Hi,

Although I haven't come up with a solution to the problem of invisible
./files in the root of tar archives I suspect the cause to be the
canonicalization of file names.

The problem can be reproduced in the following way:
mkdir dir; cd dir; touch 1 a; tar c ./* > ../arch.tar; cd ..

Now enter the archive. It'll appear empty. AFAICT this only happens with
tar balls, not with cpio or zip archives. This is probably caused by the
fact that only tar stores the preceding ./ before the file names in the
root of the archive. zip and cpio strip these when creating the archive.
Only files are affected, ./dirs are visible as expected.

This issue was introduced after 4.6.0, when the handling of cpio and tar
archives (zip also?) was somewhat synchronized. Sadly this is not or at
best poorly documented in the change logs. The solution to this problem
is probably some special handling for (the affected files inside) tar
archives.

Leonard.

-- 
mount -t life -o ro /dev/dna /genetic/research





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]