diff options
-rwxr-xr-x | rhimport-dn | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/rhimport-dn b/rhimport-dn index fcfa7e9..0b95049 100755 --- a/rhimport-dn +++ b/rhimport-dn @@ -92,7 +92,7 @@ for my $entry ($feed->entries) { my $ff = File::Fetch->new(uri => $entry->enclosure->url); print $1 . ": downloading " . $entry->enclosure->url . " (" . $entry->enclosure->length . " Bytes) .. "; - $file = "test"; #$ff->fetch( to => '/tmp' ) or die $ff->error; + $file = $ff->fetch( to => '/tmp' ) or die $ff->error; print "ok\n"; print "summary:\n" . $sum_title . "\n\n" . $sum_text . "\n"; @@ -103,6 +103,7 @@ for my $entry ($feed->entries) { local $SIG{CHLD} = 'DEFAULT'; my $pid = open3($writer, $reader, $error, @PV_SCRIPT); print $writer $sum_title . "\n" . $sum_text; + close $writer; waitpid $pid, 0; my $out = join('', <$reader>); my $errstr = ""; @@ -123,8 +124,6 @@ for my $entry ($feed->entries) { (-e "$file") or die "file '$file' not found - donwload error?\n"; print "will import $file to dropbox $dropbox (cart=$to_cart)\n\n"; -exit 0 - my $error_cb = sub { my ($text) = @_; |