This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
ID 20011206.007 File::Find:name set to empty string for "/"
authorWolfgang Laun <Wolfgang.Laun@alcatel.at>
Sun, 9 Dec 2001 13:45:06 +0000 (14:45 +0100)
committerJarkko Hietaniemi <jhi@iki.fi>
Sun, 9 Dec 2001 16:23:14 +0000 (16:23 +0000)
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 {