diff options
author | Larry Wall <lwall@netlabs.com> | 1992-06-08 04:52:56 +0000 |
---|---|---|
committer | Larry Wall <lwall@netlabs.com> | 1992-06-08 04:52:56 +0000 |
commit | 8adcabd8d9cf3c71e660c45cb7165ae4694308d4 (patch) | |
tree | 5b9373a201cf028f5311512e532230c563057c07 /lib/find.pl | |
parent | 1d4d38c37d3c694b3c50c8fd57f5afcdb93c1ffe (diff) | |
download | perl-8adcabd8d9cf3c71e660c45cb7165ae4694308d4.tar.gz |
perl 4.0 patch 25: patch #20, continued
See patch #20.
Diffstat (limited to 'lib/find.pl')
-rw-r--r-- | lib/find.pl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/find.pl b/lib/find.pl index b853d12f40..8dab0540f3 100644 --- a/lib/find.pl +++ b/lib/find.pl @@ -48,6 +48,7 @@ sub find { unless (($dir,$_) = $topdir =~ m#^(.*/)(.*)$#) { ($dir,$_) = ('.', $topdir); } + $name = $topdir; chdir $dir && &wanted; } chdir $cwd; @@ -61,7 +62,7 @@ sub finddir { # Get the list of files in the current directory. - opendir(DIR,'.') || warn "Can't open $dir: $!\n"; + opendir(DIR,'.') || (warn "Can't open $dir: $!\n", return); local(@filenames) = readdir(DIR); closedir(DIR); |