Honor trailing \n in messages, as is done for warn().
[p5sagit/p5-mst-13.2.git] / lib / Cwd.pm
index 6b84510..a627354 100644 (file)
@@ -31,7 +31,7 @@ getcwd - get pathname of current working directory
 The getcwd() function re-implements the getcwd(3) (or getwd(3)) functions
 in Perl.
 
-The fastgetcwd() function looks the same as getcwd(), but runs faster.
+The fastcwd() function looks the same as getcwd(), but runs faster.
 It's also more dangerous because you might conceivably chdir() out of a
 directory that you can't chdir() back into.
 
@@ -114,8 +114,10 @@ sub getcwd
                unless (@tst = lstat("$dotdots/$dir"))
                {
                    warn "lstat($dotdots/$dir): $!";
-                   closedir(PARENT);
-                   return '';
+                   # Just because you can't lstat this directory
+                   # doesn't mean you'll never find the right one.
+                   # closedir(PARENT);
+                   # return '';
                }
            }
            while ($dir eq '.' || $dir eq '..' || $tst[0] != $pst[0] ||