# HG changeset patch # User Mahlon E. Smith # Date 1357871067 28800 # Node ID f0616455056d70095d7a6b7ad5d7b7af400a3164 # Parent 173de72687b2ca7629bb868fe1b113e344a4648c Fix the uninitialized $path value errors I erroneously introduced on 'cd' without an argument. diff -r 173de72687b2 -r f0616455056d shelldap --- a/shelldap Tue Jan 08 15:57:22 2013 -0800 +++ b/shelldap Thu Jan 10 18:24:27 2013 -0800 @@ -762,15 +762,15 @@ my %flags = @_; my $curbase = $self->base(); + # support empty 'cd' or 'cd ~' going to root + return $conf->{'basedn'} if ! $path || $path eq '~'; + # return current base DN return $curbase if $path eq '.'; # support 'cd -' return $self->{'previous_base'} if $path eq '-'; - # support empty 'cd' or 'cd ~' going to root - return $conf->{'basedn'} if $path eq '~' || ! $path; - # relative path, upwards # if ( $path =~ /^\.\./o ) {