diff options
Diffstat (limited to 'ftp_wizard')
-rwxr-xr-x | ftp_wizard/Proftpd.pm | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/ftp_wizard/Proftpd.pm b/ftp_wizard/Proftpd.pm index ad642b63..2c2fd2fd 100755 --- a/ftp_wizard/Proftpd.pm +++ b/ftp_wizard/Proftpd.pm @@ -196,10 +196,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; |