shelldap
changeset 46 f0616455056d
parent 44 4e77e8e5d467
child 48 fe27dfe5179e
--- 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 ) {