$dir_pref = "$dir_name/";
if ( $nlink < 0 ) { # must be finddepth, report dirname now
$name = $dir_name;
+ if ( substr($name,-2) eq '/.' ) {
+ $name =~ s|/\.$||;
+ }
$dir = $p_dir;
$_ = ($no_chdir ? $dir_name : $dir_rel );
+ if ( substr($_,-2) eq '/.' ) {
+ s|/\.$||;
+ }
&$wanted_callback;
} else {
push @Stack,[$CdLvl,$p_dir,$dir_rel,-1] if $bydepth;
}
$fullname = $dir_loc;
$name = $dir_name;
+ if ( substr($name,-2) eq '/.' ) {
+ $name =~ s|/\.$||;
+ }
$dir = $p_dir;
$_ = ($no_chdir ? $dir_name : $dir_rel);
+ if ( substr($_,-2) eq '/.' ) {
+ s|/\.$||;
+ }
+
&$wanted_callback;
} else {
push @Stack,[$dir_loc, $pdir_loc, $p_dir, $dir_rel,-1] if $bydepth;