diff options
Diffstat (limited to 'lib/finddepth.pl')
-rw-r--r-- | lib/finddepth.pl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/finddepth.pl b/lib/finddepth.pl index 15e4daf561..1fe6a375b6 100644 --- a/lib/finddepth.pl +++ b/lib/finddepth.pl @@ -34,10 +34,10 @@ sub finddepth { || (warn("Can't stat $topdir: $!\n"), next); if (-d _) { if (chdir($topdir)) { - $topdir =~ s,/$,, ; - &finddepthdir($topdir,$topnlink); - ($dir,$_) = ($topdir,'.'); - $name = $topdir; + ($fixtopdir = $topdir) =~ s,/$,, ; + &finddepthdir($fixtopdir,$topnlink); + ($dir,$_) = ($fixtopdir,'.'); + $name = $fixtopdir; &wanted; } else { |