Fix the uninitialized $path value errors I erroneously introduced on

'cd' without an argument.

FossilOrigin-Name: 03c126c70be71b56220d8ec1d64ef2e199f0ff2a66e9220ad1a8477debc6955e
This commit is contained in:
mahlon@laika.com 2013-01-11 02:24:26 +00:00
parent a548c35298
commit 7bd3b3f58d

View file

@ -762,15 +762,15 @@ sub path_to_dn
my %flags = @_; my %flags = @_;
my $curbase = $self->base(); my $curbase = $self->base();
# support empty 'cd' or 'cd ~' going to root
return $conf->{'basedn'} if ! $path || $path eq '~';
# return current base DN # return current base DN
return $curbase if $path eq '.'; return $curbase if $path eq '.';
# support 'cd -' # support 'cd -'
return $self->{'previous_base'} if $path eq '-'; 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 # relative path, upwards
# #
if ( $path =~ /^\.\./o ) { if ( $path =~ /^\.\./o ) {