Bug 36766: Only list the file basename as the SFTP put destination
Sponsored-by: Horowhenua Libraries, Toi Ohomai Institute of Technology, Plant and Food Research Limited, Waitaki District Council, South Taranaki District Council New Zealand Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
62569feec9
commit
e4db67fe3a
|
|
@ -24,6 +24,7 @@ use Getopt::Long qw( GetOptions );
|
|||
use Pod::Usage qw( pod2usage );
|
||||
use Carp qw( carp );
|
||||
use C4::Letters qw( GetPreparedLetter EnqueueLetter );
|
||||
use File::Basename qw( basename );
|
||||
|
||||
=head1 NAME
|
||||
|
||||
|
|
@ -185,9 +186,8 @@ if ( $email ) {
|
|||
open my $fh, '<', $file;
|
||||
if (
|
||||
$sftp->put(
|
||||
$fh, $file,
|
||||
callback => sub { my ( $sftp, $data, $offset, $size ) = @_; warn "$offset of $size bytes transferred\n"; }
|
||||
)
|
||||
$fh, basename($file)
|
||||
)
|
||||
) {
|
||||
# Send success email
|
||||
$sftp_status = 'SUCCESS';
|
||||
|
|
|
|||
Loading…
Reference in New Issue