diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-10-17 16:54:44 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-10-17 16:54:44 +0000 |
commit | d42e3eb31ae72c4713d6cbdbea4d2d5fc9de561c (patch) | |
tree | f398a2ab6cc3adb143e00c2fd6a954d942f3935f /ftp_wizard | |
parent | 4dc2d14b2c2a97976c1beace3ad2b3f309c1e220 (diff) | |
download | drakwizard-d42e3eb31ae72c4713d6cbdbea4d2d5fc9de561c.tar drakwizard-d42e3eb31ae72c4713d6cbdbea4d2d5fc9de561c.tar.gz drakwizard-d42e3eb31ae72c4713d6cbdbea4d2d5fc9de561c.tar.bz2 drakwizard-d42e3eb31ae72c4713d6cbdbea4d2d5fc9de561c.tar.xz drakwizard-d42e3eb31ae72c4713d6cbdbea4d2d5fc9de561c.zip |
(get_dir) do not reinvent cat_or_die()
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; |