Fix the uninitialized $path value errors I erroneously introduced on
'cd' without an argument. FossilOrigin-Name: 03c126c70be71b56220d8ec1d64ef2e199f0ff2a66e9220ad1a8477debc6955e
This commit is contained in:
parent
a548c35298
commit
7bd3b3f58d
1 changed files with 3 additions and 3 deletions
6
shelldap
6
shelldap
|
|
@ -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 ) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue