From bc17ef1dee96f7b4c33e157f14c0aa2d92fd6bac Mon Sep 17 00:00:00 2001 From: Antoine Ginies Date: Wed, 6 Jul 2005 08:11:23 +0000 Subject: fix test of directory and test of hosts access in alter mode --- perl-install/standalone/draknfs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'perl-install/standalone/draknfs') diff --git a/perl-install/standalone/draknfs b/perl-install/standalone/draknfs index 5b330bd00..aeb139618 100644 --- a/perl-install/standalone/draknfs +++ b/perl-install/standalone/draknfs @@ -350,11 +350,11 @@ sub add_modify_entry { if ($lr->get_text =~ /yes/) { $lr_data = "ro" } elsif ($lr->get_text =~ /no/) { $lr_data = "rw" } else { undef $lr_data } if ($lsecure->get_text =~ /yes/) { $lsecure_data = "secure" } elsif ($lsecure->get_text =~ /no/) { $lsecure_data = "insecure" } else { undef $lsecure_data } my $all_right = join(",", grep { defined $_ } $luserid->get_text, $anonu, $anong, $lsync_data, $lsecure_data, $lr_data); + my $test_dir = $dir->get_text; + -d $test_dir or err_dialog(N("Error!"), N("Please enter a directory to share.")) and return; + my $test_access = $access->child->get_text; + $test_access or err_dialog(N("Error!"), N("You must specify hosts access.")) and return; if ($wanted =~ /add/) { - my $test_dir = $dir->get_text; - -d $test_dir or err_dialog(N("Error!"), N("Please enter a directory to share.")) and return; - my $test_access = $access->child->get_text; - $test_access or err_dialog(N("Error!"), N("You must specify hosts access.")) and return; $iter = $model->append; $i = "-1"; push @listshare, { -- cgit v1.2.1