Change 13559 by jhi@alpha on 2001/12/09 19:21:45

        Subject: Re: [ID 20011206.006] File::Find calls lstat on wrong object before 
wanted()
        From: "Wolfgang Laun" <[EMAIL PROTECTED]>             
        Date: Sun, 09 Dec 2001 13:40:58 +0100
        Message-ID: <[EMAIL PROTECTED]>
        
        (The lstat()s were there in 5.6.1: what happened to them?)

Affected files ...

.... //depot/perl/lib/File/Find.pm#57 edit

Differences ...

==== //depot/perl/lib/File/Find.pm#57 (text) ====
Index: perl/lib/File/Find.pm
--- perl/lib/File/Find.pm.~1~   Sun Dec  9 12:30:06 2001
+++ perl/lib/File/Find.pm       Sun Dec  9 12:30:06 2001
@@ -718,6 +718,8 @@
            $_= ($no_chdir ? $dir_name : $dir_rel ); # $_
            # prune may happen here
            $prune= 0;
+            # guarantee lstat for directory
+            lstat( $dir_name );
            { &$wanted_callback };      # protect against wild "next"
            next if $prune;
        }
@@ -869,6 +871,8 @@
                        s|/\.$||;
                    }
                }
+                # guarantee lstat at return to directory
+               lstat( $dir_name );
                { &$wanted_callback }; # protect against wild "next"
             }
             else {
End of Patch.

Reply via email to