summaryrefslogtreecommitdiffstats
path: root/ftp_wizard
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-10-17 16:54:44 +0000
committerThierry Vignaud <tv@mageia.org>2012-10-17 16:54:44 +0000
commitd42e3eb31ae72c4713d6cbdbea4d2d5fc9de561c (patch)
treef398a2ab6cc3adb143e00c2fd6a954d942f3935f /ftp_wizard
parent4dc2d14b2c2a97976c1beace3ad2b3f309c1e220 (diff)
downloaddrakwizard-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-xftp_wizard/Proftpd.pm5
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;