shelldap
changeset 46 f0616455056d
parent 44 4e77e8e5d467
child 48 fe27dfe5179e
equal deleted inserted replaced
45:173de72687b2 46:f0616455056d
   760 	my $self    = shift;
   760 	my $self    = shift;
   761 	my $path    = shift;
   761 	my $path    = shift;
   762 	my %flags   = @_;
   762 	my %flags   = @_;
   763 	my $curbase = $self->base();
   763 	my $curbase = $self->base();
   764 
   764 
       
   765 	# support empty 'cd' or 'cd ~' going to root
       
   766 	return $conf->{'basedn'} if ! $path || $path eq '~';
       
   767 
   765 	# return current base DN
   768 	# return current base DN
   766 	return $curbase if $path eq '.';
   769 	return $curbase if $path eq '.';
   767 
   770 
   768 	# support 'cd -'
   771 	# support 'cd -'
   769 	return $self->{'previous_base'} if $path eq '-';
   772 	return $self->{'previous_base'} if $path eq '-';
   770 
       
   771 	# support empty 'cd' or 'cd ~' going to root
       
   772 	return $conf->{'basedn'} if $path eq '~' || ! $path;
       
   773 
   773 
   774 	# relative path, upwards
   774 	# relative path, upwards
   775 	#
   775 	#
   776 	if ( $path =~ /^\.\./o ) {
   776 	if ( $path =~ /^\.\./o ) {
   777 		# support '..' (possibly iterated and as prefix to a DN)
   777 		# support '..' (possibly iterated and as prefix to a DN)