diff options
| author | fukachan <fukachan> | 2002-09-28 09:27:42 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2002-09-28 09:27:42 +0000 |
| commit | 853270e800f3733cbbb31bf6d74b052eef6a2127 (patch) | |
| tree | 8bdcf5bcd76b828498f42e62071e60a77900d61d /fml/lib/Mail/ThreadTrack | |
| parent | ee8f7c907631f76052fff6ff8563327df04df160 (diff) | |
| download | fml8-853270e800f3733cbbb31bf6d74b052eef6a2127.tar.gz fml8-853270e800f3733cbbb31bf6d74b052eef6a2127.tar.bz2 fml8-853270e800f3733cbbb31bf6d74b052eef6a2127.zip | |
we should not use hard-coded file/dir mode
Diffstat (limited to 'fml/lib/Mail/ThreadTrack')
| -rw-r--r-- | fml/lib/Mail/ThreadTrack/DB.pm | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/fml/lib/Mail/ThreadTrack/DB.pm b/fml/lib/Mail/ThreadTrack/DB.pm index 5e934f27..ccd883cc 100644 --- a/fml/lib/Mail/ThreadTrack/DB.pm +++ b/fml/lib/Mail/ThreadTrack/DB.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: DB.pm,v 1.27 2002/09/11 23:18:29 fukachan Exp $ +# $FML: DB.pm,v 1.28 2002/09/22 14:57:06 fukachan Exp $ # package Mail::ThreadTrack::DB; @@ -57,8 +57,9 @@ my @kind_of_databases = qw(thread_id date status sender articles sub db_open { my ($self) = @_; - my $db_type = $self->{ config }->{ db_type } || 'AnyDBM_File'; - my $db_dir = $self->{ _db_dir }; + my $db_type = $self->{ config }->{ db_type } || 'AnyDBM_File'; + my $db_dir = $self->{ _db_dir }; + my $file_mode = $self->{ _file_mode } || 0644; use File::Spec; eval qq{ use $db_type; use Fcntl;}; @@ -67,7 +68,7 @@ sub db_open my $file = File::Spec->catfile($db_dir, $db); my $str = qq{ my \%$db = (); - tie \%$db, \$db_type, \$file, O_RDWR|O_CREAT, 0644; + tie \%$db, \$db_type, \$file, O_RDWR|O_CREAT, $file_mode; \$self->{ _hash_table }->{ _$db } = \\\%$db; }; eval $str; @@ -77,7 +78,7 @@ sub db_open my %index = (); my $index_file = $self->{ _index_db }; eval q{ - tie %index, $db_type, $index_file, O_RDWR|O_CREAT, 0644; + tie %index, $db_type, $index_file, O_RDWR|O_CREAT, $file_mode; $self->{ _hash_table }->{ _index } = \%index; }; croak($@) if $@; |
