diff options
| author | fukachan <fukachan> | 2002-04-06 01:30:54 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2002-04-06 01:30:54 +0000 |
| commit | 9519079213b3a3a939c66770bed32eb84323affe (patch) | |
| tree | cec95a4c4def43455cb877a4fbd6fe206940cf55 /fml | |
| parent | 7d7a6395aca56b967aff6ae10cd250dbc24ac349 (diff) | |
| download | fml8-9519079213b3a3a939c66770bed32eb84323affe.tar.gz fml8-9519079213b3a3a939c66770bed32eb84323affe.tar.bz2 fml8-9519079213b3a3a939c66770bed32eb84323affe.zip | |
mkdir subdir if needed
Diffstat (limited to 'fml')
| -rw-r--r-- | fml/lib/FML/Article.pm | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/fml/lib/FML/Article.pm b/fml/lib/FML/Article.pm index 7f018f72..4f84882f 100644 --- a/fml/lib/FML/Article.pm +++ b/fml/lib/FML/Article.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: Article.pm,v 1.34 2002/04/03 11:32:57 fukachan Exp $ +# $FML: Article.pm,v 1.35 2002/04/05 04:19:43 fukachan Exp $ # package FML::Article; @@ -210,11 +210,18 @@ sub filepath use Mail::Message::Spool; my $spool = new Mail::Message::Spool; - my $file = $spool->filepath( { + my $args = { base_dir => $spool_dir, id => $id, use_subdir => $use_subdir, - } ); + } ; + my $file = $spool->filepath($args); + my $dir = $spool->dirpath($args); + + unless (-d $dir) { + eval q{ use File::Utils qw(mkdirhier);}; + mkdirhier($dir, 0700); + } return $file; } |
