diff options
| author | fukachan <fukachan> | 2002-04-15 03:47:23 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2002-04-15 03:47:23 +0000 |
| commit | edd906a12ae6c0f113cd52365cfb60e747371c54 (patch) | |
| tree | 8a478084394f9698ebce39b238ecfec0e0ac274d /fml | |
| parent | 0166017eaf01b7949ed3b078c83c9cc3ebe14cb1 (diff) | |
| download | fml8-edd906a12ae6c0f113cd52365cfb60e747371c54.tar.gz fml8-edd906a12ae6c0f113cd52365cfb60e747371c54.tar.bz2 fml8-edd906a12ae6c0f113cd52365cfb60e747371c54.zip | |
umask and permission control for html archives
Diffstat (limited to 'fml')
| -rw-r--r-- | fml/lib/FML/Process/Distribute.pm | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/fml/lib/FML/Process/Distribute.pm b/fml/lib/FML/Process/Distribute.pm index 108e0099..c4034455 100644 --- a/fml/lib/FML/Process/Distribute.pm +++ b/fml/lib/FML/Process/Distribute.pm @@ -3,7 +3,7 @@ # Copyright (C) 2000,2001,2002 Ken'ichi Fukamachi # All rights reserved. # -# $FML: Distribute.pm,v 1.69 2002/04/10 09:00:08 fukachan Exp $ +# $FML: Distribute.pm,v 1.70 2002/04/12 11:54:38 fukachan Exp $ # package FML::Process::Distribute; @@ -461,12 +461,22 @@ sub htmlify my $article_id = $pcb->get('article', 'id'); my $article_file = $article->filepath($article_id); + $curproc->set_umask_as_public(); + eval q{ use Mail::Message::ToHTML; - use File::Utils qw(mkdirhier); }; unless ($@) { - mkdirhier($html_dir) unless -d $html_dir; + unless (-d $html_dir) { + eval q{ + use File::Path; + mkpath($html_dir, 0, 0755); + Log("mkdir $html_dir") if -d $html_dir; + LogError("fail to mkdir $html_dir") unless -d $html_dir; + }; + if ($@) { LogError($@);} + } + &Mail::Message::ToHTML::htmlify_file($article_file, { directory => $html_dir, }); @@ -474,6 +484,8 @@ sub htmlify else { Log($@) if $@; } + + $curproc->reset_umask(); } |
