&$wanted;
my $fixtopdir = $topdir;
$fixtopdir =~ s,/$,, ;
- $fixtopdir =~ s/\.dir$// if $Is_VMS; ;
+ $fixtopdir =~ s/\.dir$// if $Is_VMS;
+ $fixtopdir =~ s/\\dir$// if $Is_NT;
&finddir($wanted,$fixtopdir,$topnlink);
}
else {
}
}
else {
- unless (($dir,$_) = File::Basename::fileparse($topdir)) {
+ unless (($_,$dir) = File::Basename::fileparse($topdir)) {
($dir,$_) = ('.', $topdir);
}
$name = $topdir;
if (!$prune && chdir $_) {
$name =~ s/\.dir$// if $Is_VMS;
+ $name =~ s/\\dir$// if $Is_NT;
&finddir($wanted,$name,$nlink);
chdir '..';
}
my $fixtopdir = $topdir;
$fixtopdir =~ s,/$,, ;
$fixtopdir =~ s/\.dir$// if $Is_VMS;
+ $fixtopdir =~ s/\\dir$// if $Is_NT;
&finddepthdir($wanted,$fixtopdir,$topnlink);
($dir,$_) = ($fixtopdir,'.');
$name = $fixtopdir;
}
}
else {
- unless (($dir,$_) = File::Basename::fileparse($topdir)) {
+ unless (($_,$dir) = File::Basename::fileparse($topdir)) {
($dir,$_) = ('.', $topdir);
}
chdir $dir && &$wanted;
if (chdir $_) {
$name =~ s/\.dir$// if $Is_VMS;
+ $name =~ s/\\dir$// if $Is_NT;
&finddepthdir($wanted,$name,$nlink);
chdir '..';
}
$Is_VMS = 1;
$dont_use_nlink = 1;
}
+if ($^O =~ m:^mswin32:i) {
+ $Is_NT = 1;
+ $dont_use_nlink = 1;
+}
$dont_use_nlink = 1 if $^O eq 'os2';
-$dont_use_nlink = 1 if $^O =~ m:^mswin32$:i ;
1;