This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #40369] File::Find mishandles non-dangling symlinks
authorammon@rhythm.com <ammon@rhythm.com>
Tue, 19 Sep 2006 20:56:32 +0000 (13:56 -0700)
committerSteve Peters <steve@fisharerojo.org>
Thu, 21 Sep 2006 02:17:30 +0000 (02:17 +0000)
From: ammon@rhythm.com (via RT) <perlbug-followup@perl.org>
Message-ID: <rt-3.5.HEAD-31258-1158724592-1714.40369-75-0@perl.org>

p4raw-id: //depot/perl@28876

lib/File/Find.pm

index 213b4c0..864c207 100644 (file)
@@ -1119,7 +1119,7 @@ sub _find_dir_symlnk($$$) {
 
            # ignore if invalid symlink
            unless (defined $new_loc) {
-               if ($dangling_symlinks) {
+               if (!defined -l _ && $dangling_symlinks) {
                    if (ref $dangling_symlinks eq 'CODE') {
                        $dangling_symlinks->($FN, $dir_pref);
                    } else {