Skip Menu |

This queue is for tickets about the File-Copy-Recursive CPAN distribution.

Report information
The Basics
Id: 23969
Status: resolved
Priority: 0/
Queue: File-Copy-Recursive

People
Owner: Nobody in particular
Requestors: olaf.gellert [...] intrusion-lab.net
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.30



Subject: Error message on copying of symlink
Date: Sun, 17 Dec 2006 13:37:06 +0100
To: bug-File-Copy-Recursive [...] rt.cpan.org
From: Olaf Gellert <olaf.gellert [...] intrusion-lab.net>
Hi, I try to copy a directory recursively which contains some symlinks: Show quoted text
> ls -l /home/gellert/keys
/home/gellert/keys /home/gellert/keys/keyfile.txt /home/gellert/keys/keylink.txt -> keyfile.txt Now I call: File::Copy::Recursive::dircopy("/home/gellert/keys", "/home/gellert/keys2"); I get the following error message: Use of uninitialized value in -e at /usr/lib/perl5/site_perl/5.8.7/File/Copy/Recursive.pm line 184. Copying a symlink (/home/gellert/keys) whose target does not exist at ./fasel.pl line 5 The directory and the symlinks are copied correctly, though. This is the part of the code of Recursive.pm (starting at line 179): for my $file (@files) { my ($file_ut) = $file =~ m{ (.*) }xms; my $org = File::Spec->catfile($str, $file_ut); my $new = File::Spec->catfile($end, $file_ut); if(-l $org && ($CopyLink || !-e readlink($_[0])) ) { carp "Copying a symlink ($_[0]) whose target does not exist" if !-e readlink($_[0]); symlink readlink($org), $new or return; } I wonder why "readlink" is called on $_[0] (which in this case is the directory "/home/gellert/keys"), while the actual link to be copied seems to be $org and the new destination is $new. I am using File::Copy::Recursive 0.29, but in the changes to 0.30 no relevant change for this issue is noted. Regards, Olaf -- Dipl.Inform. Olaf Gellert INTRUSION-LAB.NET Senior Researcher, www.intrusion-lab.net PKI - and IDS - Services olaf.gellert@intrusion-lab.net
From: DMUEY [...] cpan.org
Show quoted text
> The directory and the symlinks are copied correctly, though. This is
Because it doesn't say it failed, it says its copying a symlink whose target does not exist, just sort of an FYI. You can ignore it, or better yet go to the latest version that has them quieted by default. Show quoted text
> I am using File::Copy::Recursive 0.29, but in the changes to > 0.30 no relevant change for this issue is noted.
http://search.cpan.org/src/DMUEY/File-Copy-Recursive-0.30/Changes 0.30 Fri Dec 8 14:26:49 2006 - Added $BdTrgWrn to quiet warnings by default (rt 23861)