From 484543a67e5ceae8489dea6c153c4ab83678df08 Mon Sep 17 00:00:00 2001 From: Arnaud Desmons Date: Fri, 20 Dec 2002 17:40:20 +0000 Subject: open before use :-) --- ftp_wizard/scripts/ProFtpconf.pm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ftp_wizard') diff --git a/ftp_wizard/scripts/ProFtpconf.pm b/ftp_wizard/scripts/ProFtpconf.pm index 5db3c385..711ecc3c 100644 --- a/ftp_wizard/scripts/ProFtpconf.pm +++ b/ftp_wizard/scripts/ProFtpconf.pm @@ -42,6 +42,10 @@ sub check_dir { } sub get_dir { + my $file = "/etc/proftpd.conf"; + die "no ftp configuration file found ! warning." if (!-f $file); + open(NEW, "< $file") or die "error while opening $file: $!"; + while () { # we need 3 elements to consider section as known if (m/^\s*/s...m/^\s*<\/drakwizard>/s ) { if (m/^\s*/s ) { -- cgit v1.2.1