summaryrefslogtreecommitdiff
path: root/lib/find.pl
diff options
context:
space:
mode:
authorLarry Wall <larry@netlabs.com>1994-03-18 00:00:00 +0000
committerLarry Wall <larry@netlabs.com>1994-03-18 00:00:00 +0000
commit8990e3071044a96302560bbdb5706f3e74cf1bef (patch)
tree6cf4a58108544204591f25bd2d4f1801d49334b4 /lib/find.pl
parented6116ce9b9d13712ea252ee248b0400653db7f9 (diff)
downloadperl-8990e3071044a96302560bbdb5706f3e74cf1bef.tar.gz
perl 5.0 alpha 6
[editor's note: cleaned up from the September '94 InfoMagic CD, just like the last commit]
Diffstat (limited to 'lib/find.pl')
-rw-r--r--lib/find.pl6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/find.pl b/lib/find.pl
index 8dab0540f3..d55cd33122 100644
--- a/lib/find.pl
+++ b/lib/find.pl
@@ -26,6 +26,8 @@
# $dev < 0 &&
# ($prune = 1);
# }
+#
+# Set the variable $dont_use_nlink if you're using AFS, since AFS cheats.
sub find {
chop($cwd = `pwd`);
@@ -66,7 +68,7 @@ sub finddir {
local(@filenames) = readdir(DIR);
closedir(DIR);
- if ($nlink == 2) { # This dir has no subdirectories.
+ if ($nlink == 2 && !$dont_use_nlink) { # This dir has no subdirectories.
for (@filenames) {
next if $_ eq '.';
next if $_ eq '..';
@@ -83,7 +85,7 @@ sub finddir {
$nlink = $prune = 0;
$name = "$dir/$_";
&wanted;
- if ($subcount > 0) { # Seen all the subdirs?
+ if ($subcount > 0 || $dont_use_nlink) { # Seen all the subdirs?
# Get link count and check for directoriness.