|Subject:||Tar of FOLLOWed symlink fails|
Fedora 15, Perl 5.12 Creating a tar file of a symlink with FOLLOW_SYMLINK fails with "Could not write data". I expected it to de-reference the symlink and store the regular file's data in the archive under the regular file's name. Reproducer: # touch foo # ln -s foo bar # perl -MArchive::Tar -e'$Archive::Tar::FOLLOW_SYMLINK = 1; my $t = Archive::Tar->new; $t->add_files("bar"); $t->write( "baz.tgz", COMPRESS_GZIP );print $t->error(1); print $Archive::Tar::VERSION' Could not write data for: bar at -e line 1 Could not write data for: bar at /usr/share/perl5/Archive/Tar.pm line 1293 Archive::Tar::write('Archive::Tar=HASH(0x9dcf90)', 'baz.tgz', 9) called at -e line 1 1.78 The same command adding "foo" instead of bar works. Linux myhost 2.6.40-4.fc15.x86_64 #1 SMP Fri Jul 29 18:46:53 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux perl 5, version 12, subversion 4 (v5.12.4) built for x86_64-linux- thread-multi Archive::Tar 1.78 Thanks in advance for your help.