summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xftp_wizard/Proftpd.pm5
1 files changed, 1 insertions, 4 deletions
diff --git a/ftp_wizard/Proftpd.pm b/ftp_wizard/Proftpd.pm
index 7af7bbe6..e19c2b43 100755
--- a/ftp_wizard/Proftpd.pm
+++ b/ftp_wizard/Proftpd.pm
@@ -189,10 +189,7 @@ sub true {
sub get_dir {
die "no FTP configuration file found! warning." if !-f $file;
- local *NEW;
- open(NEW, "< $file") or die "error while opening $file: $!";
- local $_;
- while (<NEW>) { # we need 3 elements to consider section as known
+ foreach (cat_or_die($file)) { # we need 3 elements to consider section as known
if (m/^\s*<drakwizard>/s...m!^\s*</drakwizard>!s) {
if (m/^\s*<Anonymous\s*(.*)>/s) {
return $1;