This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Re: NUL in die and other messages
[perl5.git] / lib / pwd.pl
index 89fc230..beb5916 100644 (file)
@@ -1,20 +1,8 @@
 ;# pwd.pl - keeps track of current working directory in PWD environment var
 ;#
-;# $RCSfile: pwd.pl,v $$Revision: 4.0.1.1 $$Date: 92/06/08 13:45:22 $
+;# $RCSfile: pwd.pl,v $$Revision: 4.1 $$Date: 92/08/07 18:24:11 $
 ;#
 ;# $Log:       pwd.pl,v $
-;# Revision 4.0.1.1  92/06/08  13:45:22  lwall
-;# patch20: support added to pwd.pl to strip automounter crud
-;# 
-;# Revision 4.0  91/03/20  01:26:03  lwall
-;# 4.0 baseline.
-;# 
-;# Revision 3.0.1.2  91/01/11  18:09:24  lwall
-;# patch42: some .pl files were missing their trailing 1;
-;# 
-;# Revision 3.0.1.1  90/08/09  04:01:24  lwall
-;# patch19: Initial revision
-;# 
 ;#
 ;# Usage:
 ;#     require "pwd.pl";
@@ -46,6 +34,7 @@ sub main'initpwd {
 
 sub main'chdir {
     local($newdir) = shift;
+    $newdir =~ s|/{2,}|/|g;
     if (chdir $newdir) {
        if ($newdir =~ m#^/#) {
            $ENV{'PWD'} = $newdir;