This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
$File::Find::name doesn't reflect top level files
authorGurusamy Sarathy <gsar@cpan.org>
Tue, 21 Mar 2000 03:34:39 +0000 (03:34 +0000)
committerGurusamy Sarathy <gsar@cpan.org>
Tue, 21 Mar 2000 03:34:39 +0000 (03:34 +0000)
correctly (from Simon Cozens <simon@brecon.co.uk>)

p4raw-id: //depot/perl@5849

lib/File/Find.pm

index 22a8ab3..ac73f1b 100644 (file)
@@ -349,7 +349,7 @@ sub _find_opt {
 
         unless ($Is_Dir) {
            unless (($_,$dir) = File::Basename::fileparse($abs_dir)) {
-               ($dir,$_) = ('.', $top_item);
+               ($dir,$_) = ('./', $top_item);
            }
 
             $abs_dir = $dir;
@@ -370,9 +370,9 @@ sub _find_opt {
                 warn "Couldn't chdir $abs_dir: $!\n";
                 next Proc_Top_Item;
             }
-            
-            $name = $abs_dir;
-            
+
+            $name = $abs_dir . $_;
+
             &$wanted_callback;
 
         }