summaryrefslogtreecommitdiff
path: root/rhimport-zf
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2014-06-20 18:00:17 (GMT)
committerChristian Pointner <equinox@helsinki.at>2014-06-20 18:00:17 (GMT)
commitbad34ad0166f03e753905aae1bbe1cdea2d9c4f8 (patch)
treec81f581896bad1e225ff86929f46d3df6443744a /rhimport-zf
parent8024313b2ee5d430692cc96755d6e4514e42827f (diff)
added check for supported file extension
Diffstat (limited to 'rhimport-zf')
-rwxr-xr-xrhimport-zf5
1 files changed, 5 insertions, 0 deletions
diff --git a/rhimport-zf b/rhimport-zf
index 24c7ad7..c255519 100755
--- a/rhimport-zf
+++ b/rhimport-zf
@@ -115,6 +115,11 @@ for my $entry ($feed->entries) {
exit 0;
}
$out_file = $ff->output_file;
+ if(!rhimport::check_file_extension($out_file)) {
+ print "\n\nThe extension of the matching file '". $out_file . "' seems to be wrong - manual import necessary!!!\n";
+ $dbh->disconnect();
+ exit 0;
+ }
print $regexp . ": downloading " . $entry->enclosure->url . " (" . $entry->enclosure->length . " Bytes) .. ";
$file = $ff->fetch( to => '/tmp' ) or die $ff->error;