use WebPAC::Input 0.16;
use WebPAC::Store 0.15;
use WebPAC::Normalize 0.22;
-use WebPAC::Output::TT;
+#use WebPAC::Output::TT;
use WebPAC::Validate 0.11;
use WebPAC::Output::MARC;
use WebPAC::Config;
if ( $mirror ) {
my $path = $input->{path} || die "no input path in ",dump( $input );
- $log->info( "mirror ", $path, " ", -s $path, " bytes" );
- $log->warn( "$path not modified" )
- if mirror( "$mirror/$path", $path ) == RC_NOT_MODIFIED;
+ my $base = $path;
+ $base =~ s{/[^/]+$}{};
+ mkpath $base unless -e $base;
+
+ my $rc = mirror( "$mirror/$path", $path );
+ if (is_error( $rc )) {
+ die "can't mirror $mirror/$path -> $path [$rc]";
+ } else {
+ $log->info( "mirror ", $path, " [$rc] ", -s $path, " bytes" );
+ }
+
}
my $input_db = new WebPAC::Input(