diff options
Diffstat (limited to 'bin/cdr.sftp_and_import')
-rwxr-xr-x | bin/cdr.sftp_and_import | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/bin/cdr.sftp_and_import b/bin/cdr.sftp_and_import index f68d70c76..57d4e871e 100755 --- a/bin/cdr.sftp_and_import +++ b/bin/cdr.sftp_and_import @@ -61,13 +61,11 @@ foreach my $file ( @$ls ) { warn "Processing $filename\n" if $opt_v; - open(FILE, "$cachedir/$filename") or die "can't read $cachedir/$filename: $!"; - my $error = FS::cdr::batch_import( { - 'filehandle' => *FILE{IO}, - 'format' => $format, - 'cdrbatch' => $filename, - 'empty_ok' => 1, + 'file' => "$cachedir/$filename" + 'format' => $format, + 'cdrbatch' => $filename, + 'empty_ok' => 1, } ); die $error if $error; |