summaryrefslogtreecommitdiff
path: root/fml/lib/FML
diff options
context:
space:
mode:
authorfukachan <fukachan>2002-09-28 09:27:42 +0000
committerfukachan <fukachan>2002-09-28 09:27:42 +0000
commit853270e800f3733cbbb31bf6d74b052eef6a2127 (patch)
tree8bdcf5bcd76b828498f42e62071e60a77900d61d /fml/lib/FML
parentee8f7c907631f76052fff6ff8563327df04df160 (diff)
downloadfml8-853270e800f3733cbbb31bf6d74b052eef6a2127.tar.gz
fml8-853270e800f3733cbbb31bf6d74b052eef6a2127.tar.bz2
fml8-853270e800f3733cbbb31bf6d74b052eef6a2127.zip
we should not use hard-coded file/dir mode
Diffstat (limited to 'fml/lib/FML')
-rw-r--r--fml/lib/FML/Confirm.pm5
-rw-r--r--fml/lib/FML/Header/MessageID.pm8
2 files changed, 8 insertions, 5 deletions
diff --git a/fml/lib/FML/Confirm.pm b/fml/lib/FML/Confirm.pm
index 5cd48482..8156fdfe 100644
--- a/fml/lib/FML/Confirm.pm
+++ b/fml/lib/FML/Confirm.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: Confirm.pm,v 1.6 2002/09/15 00:08:54 fukachan Exp $
+# $FML: Confirm.pm,v 1.7 2002/09/22 14:56:40 fukachan Exp $
#
package FML::Confirm;
@@ -117,6 +117,7 @@ sub _open_db
{
my ($self, $id, $comment) = @_;
my (%db) = ();
+ my $mode = $self->{ _dir_mode } || 0700;
use File::Spec;
my $cache_dir = $self->{ _cache_dir };
@@ -125,7 +126,7 @@ sub _open_db
unless (-d $dir) {
use File::Path;
- mkpath( [ $dir ], 0, 0700 );
+ mkpath( [ $dir ], 0, $mode );
}
use Tie::JournaledDir;
diff --git a/fml/lib/FML/Header/MessageID.pm b/fml/lib/FML/Header/MessageID.pm
index fad54515..e183bc20 100644
--- a/fml/lib/FML/Header/MessageID.pm
+++ b/fml/lib/FML/Header/MessageID.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: MessageID.pm,v 1.7 2002/09/11 23:18:12 fukachan Exp $
+# $FML: MessageID.pm,v 1.8 2002/09/22 14:56:50 fukachan Exp $
#
package FML::Header::MessageID;
@@ -77,8 +77,10 @@ sub db_open
if ($dir) {
unless (-d $dir) {
- eval q{ use File::Utils qw(mkdirhier);};
- mkdirhier($dir, 0700);
+ my $dir_mode = $self->{ _dir_mode } || 0700;
+
+ use File::Path;
+ mkpath( [ $dir ], 0, $dir_mode );
}
my %db = ();