# compatibility.
local($topdir,$topdev,$topino,$topmode,$topnlink);
foreach $topdir (@_) {
- (($topdev,$topino,$topmode,$topnlink) = stat($topdir))
+ (($topdev,$topino,$topmode,$topnlink) =
+ ($Is_VMS ? stat($topdir) : lstat($topdir)))
|| (warn("Can't stat $topdir: $!\n"), next);
if (-d _) {
if (chdir($topdir)) {
($dir,$_) = ($topdir,'.');
$name = $topdir;
+ $prune = 0;
&$wanted;
- my $fixtopdir = $topdir;
- $fixtopdir =~ s,/$,, ;
- $fixtopdir =~ s/\.dir$// if $Is_VMS;
- $fixtopdir =~ s/\\dir$// if $Is_NT;
- &finddir($wanted,$fixtopdir,$topnlink);
+ if (!$prune) {
+ my $fixtopdir = $topdir;
+ $fixtopdir =~ s,/$,, ;
+ $fixtopdir =~ s/\.dir$// if $Is_VMS;
+ $fixtopdir =~ s/\\dir$// if $Is_NT;
+ &finddir($wanted,$fixtopdir,$topnlink);
+ }
}
else {
warn "Can't cd to $topdir: $!\n";
# compatibility.
local($topdir, $topdev, $topino, $topmode, $topnlink);
foreach $topdir (@_) {
- (($topdev,$topino,$topmode,$topnlink) = stat($topdir))
+ (($topdev,$topino,$topmode,$topnlink) =
+ ($Is_VMS ? stat($topdir) : lstat($topdir)))
|| (warn("Can't stat $topdir: $!\n"), next);
if (-d _) {
if (chdir($topdir)) {
unless (($_,$dir) = File::Basename::fileparse($topdir)) {
($dir,$_) = ('.', $topdir);
}
+ $name = $topdir;
chdir $dir && &$wanted;
}
chdir $cwd;