ID 20011206.007 File::Find:name set to empty string for "/"
Wolfgang Laun [Sun, 9 Dec 2001 13:45:06 +0000 (14:45 +0100)]
Message-ID: <200112091345060760.00929EA9@smtp.chello.at>

p4raw-id: //depot/perl@13552

lib/File/Find.pm

index b772f9d..f43329d 100644 (file)
@@ -550,6 +550,8 @@ sub _find_opt {
                $cwd = "$cwd:" unless ($cwd =~ /:$/); # for safety
 
                if ($top_item eq $File::Find::current_dir) {
+                  # avoid empty name after return to '/'
+                  $name = '/' unless length( $name );
                    $abs_dir = $cwd;
                }
                else {