From 7bd3b3f58db16ad66dbbb17b0d51629455a0d1c2 Mon Sep 17 00:00:00 2001 From: "mahlon@laika.com" Date: Fri, 11 Jan 2013 02:24:26 +0000 Subject: [PATCH] Fix the uninitialized $path value errors I erroneously introduced on 'cd' without an argument. FossilOrigin-Name: 03c126c70be71b56220d8ec1d64ef2e199f0ff2a66e9220ad1a8477debc6955e --- shelldap | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/shelldap b/shelldap index 877cc1b..96d91d2 100755 --- a/shelldap +++ b/shelldap @@ -762,15 +762,15 @@ sub path_to_dn 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 ) {