summaryrefslogtreecommitdiff
path: root/lib/find.pl
diff options
context:
space:
mode:
authorLarry Wall <lwall@netlabs.com>1992-06-08 04:52:56 +0000
committerLarry Wall <lwall@netlabs.com>1992-06-08 04:52:56 +0000
commit8adcabd8d9cf3c71e660c45cb7165ae4694308d4 (patch)
tree5b9373a201cf028f5311512e532230c563057c07 /lib/find.pl
parent1d4d38c37d3c694b3c50c8fd57f5afcdb93c1ffe (diff)
downloadperl-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.pl3
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);