--- trunk/lib/WebPAC/Output/Estraier.pm 2009/04/23 13:20:51 1147 +++ trunk/lib/WebPAC/Output/Estraier.pm 2009/04/24 09:37:08 1148 @@ -11,6 +11,7 @@ use LWP; use URI::Escape; use List::Util qw/first/; +use File::Path qw/mkpath/; use YAML; =head1 NAME @@ -294,7 +295,11 @@ my $self = shift; my $log = $self->_get_logger(); - my $path = 'var/estraier/' . $self->{database} . '.yaml'; + my $path = 'var/estraier'; + + mkpath $path unless -e $path; + + $path .= '/' . $self->{database} . '.yaml'; YAML::DumpFile( $path, $self->{stats} ); $log->info("created $path ", -s $path, " bytes"); $log->debug( dump( $self->{stats} ) );