projects
/
webpac2
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
db74a57
)
create var/estraier if it doesn't exist
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Fri, 24 Apr 2009 09:37:08 +0000
(09:37 +0000)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Fri, 24 Apr 2009 09:37:08 +0000
(09:37 +0000)
git-svn-id: svn+ssh://mjesec/home/dpavlin/svn/webpac2/trunk@1148
07558da8
-63fa-0310-ba24-
9fe276d99e06
lib/WebPAC/Output/Estraier.pm
patch
|
blob
|
history
diff --git
a/lib/WebPAC/Output/Estraier.pm
b/lib/WebPAC/Output/Estraier.pm
index
fa95063
..
fbf0900
100644
(file)
--- a/
lib/WebPAC/Output/Estraier.pm
+++ b/
lib/WebPAC/Output/Estraier.pm
@@
-11,6
+11,7
@@
use Data::Dump qw/dump/;
use LWP;
use URI::Escape;
use List::Util qw/first/;
+use File::Path qw/mkpath/;
use YAML;
=head1 NAME
@@
-294,7
+295,11
@@
sub finish {
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} ) );