summaryrefslogtreecommitdiff
path: root/fml/lib/FML/Command/Admin
diff options
context:
space:
mode:
authorfukachan <fukachan>2002-09-15 00:11:42 +0000
committerfukachan <fukachan>2002-09-15 00:11:42 +0000
commit4523d35e5d720a61260acd3520d912e2a2e41e24 (patch)
tree4562d419ee8bda9dc2de45f97e53c763d91a20b7 /fml/lib/FML/Command/Admin
parentba2b04ae60a0e3e231202f932a3c4a1ddaab10b4 (diff)
downloadfml8-4523d35e5d720a61260acd3520d912e2a2e41e24.tar.gz
fml8-4523d35e5d720a61260acd3520d912e2a2e41e24.tar.bz2
fml8-4523d35e5d720a61260acd3520d912e2a2e41e24.zip
switched to use of $curproc->mkdir() if could
Diffstat (limited to 'fml/lib/FML/Command/Admin')
-rw-r--r--fml/lib/FML/Command/Admin/check.pm4
-rw-r--r--fml/lib/FML/Command/Admin/newml.pm28
2 files changed, 10 insertions, 22 deletions
diff --git a/fml/lib/FML/Command/Admin/check.pm b/fml/lib/FML/Command/Admin/check.pm
index 19337c37..1396c55b 100644
--- a/fml/lib/FML/Command/Admin/check.pm
+++ b/fml/lib/FML/Command/Admin/check.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: check.pm,v 1.1 2002/04/30 16:17:14 fukachan Exp $
+# $FML: check.pm,v 1.2 2002/06/01 05:02:32 fukachan Exp $
#
package FML::Command::Admin::check;
@@ -88,7 +88,7 @@ sub check_spool_dir
}
else {
print "fail. not exist\n";
- -d $spool_dir || midir($spool_dir, 0700);
+ -d $spool_dir || $curproc->($spool_dir, "mode=private");
print " created $spool_dir\n";
}
diff --git a/fml/lib/FML/Command/Admin/newml.pm b/fml/lib/FML/Command/Admin/newml.pm
index 42f743c2..1b4e99d3 100644
--- a/fml/lib/FML/Command/Admin/newml.pm
+++ b/fml/lib/FML/Command/Admin/newml.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: newml.pm,v 1.49 2002/08/28 15:07:07 fukachan Exp $
+# $FML: newml.pm,v 1.50 2002/09/11 23:18:08 fukachan Exp $
#
package FML::Command::Admin::newml;
@@ -140,20 +140,16 @@ sub _init_ml_home_dir
my $config = $curproc->{ 'config' };
my $ml_home_dir = $config->{ ml_home_dir };
- eval q{
- use File::Utils qw(mkdirhier);
- unless (-d $ml_home_dir) {
- mkdirhier( $ml_home_dir, $config->{ default_dir_mode } || 0755 );
- }
- };
- croak($@) if $@;
+ unless (-d $ml_home_dir) {
+ $curproc->mkdir($ml_home_dir, "mode=public");
+ }
# $ml_home_dir/etc/mail
my $dirlist = $config->get_as_array_ref('newml_command_init_dirs');
for my $_dir (@$dirlist) {
unless (-d $_dir) {
print STDERR "creating $_dir\n";
- mkdirhier( $_dir, $config->{ default_dir_mode } || 0755 );
+ $curproc->mkdir( $_dir, "mode=public");
}
}
}
@@ -285,12 +281,9 @@ sub _setup_mail_archive_dir
my $config = $curproc->{ config };
my $dir = $config->{ html_archive_dir };
- eval q{ use File::Utils qw(mkdirhier);};
- croak($@) if $@;
-
unless (-d $dir) {
print STDERR "creating $dir\n";
- mkdirhier( $dir, $config->{ default_dir_mode } || 0755 );
+ $curproc->mkdir($dir, "mode=public");
}
}
@@ -312,9 +305,6 @@ sub _setup_cgi_interface
#
# 1. create directory path if needed
#
- eval q{ use File::Utils qw(mkdirhier);};
- croak($@) if $@;
-
my (%is_dir_exists) = ();
my $cgi_base_dir = $config->{ cgi_base_dir };
my $admin_cgi_dir = $config->{ admin_cgi_base_dir };
@@ -323,7 +313,7 @@ sub _setup_cgi_interface
unless (-d $dir) {
print STDERR "creating $dir\n";
$is_dir_exists{ $dir } = 0;
- mkdirhier( $dir, $config->{ default_dir_mode } || 0755 );
+ $curproc->mkdir($dir, "mode=public");
}
else {
$is_dir_exists{ $dir } = 1;
@@ -411,10 +401,8 @@ sub _setup_listinfo
my $template_dir = $config->{ listinfo_template_dir };
my $listinfo_dir = $config->{ listinfo_dir };
- eval q{ use File::Utils qw(mkdirhier);};
- croak($@) if $@;
unless (-d $listinfo_dir) {
- mkdirhier($listinfo_dir, $config->{ default_dir_mode } || 0755 );
+ $curproc->mkdir($listinfo_dir, "mode=public");
}
use DirHandle;