Lines 21-26
use MARC::File::XML;
Link Here
|
21 |
use List::MoreUtils qw( uniq ); |
21 |
use List::MoreUtils qw( uniq ); |
22 |
use Getopt::Long qw( GetOptions ); |
22 |
use Getopt::Long qw( GetOptions ); |
23 |
use Pod::Usage qw( pod2usage ); |
23 |
use Pod::Usage qw( pod2usage ); |
|
|
24 |
use File::Basename qw( fileparse ); |
24 |
|
25 |
|
25 |
use Koha::Script; |
26 |
use Koha::Script; |
26 |
use C4::Auth; |
27 |
use C4::Auth; |
Lines 384-390
if ($file_transport) {
Link Here
|
384 |
} |
385 |
} |
385 |
|
386 |
|
386 |
# Upload the file |
387 |
# Upload the file |
387 |
unless ( $file_transport->upload_file( $filename, $filename ) ) { |
388 |
# Extract just the filename from the path for remote upload |
|
|
389 |
my ($remote_filename) = fileparse($filename); |
390 |
unless ( $file_transport->upload_file( $filename, $remote_filename ) ) { |
388 |
$file_transport->disconnect; |
391 |
$file_transport->disconnect; |
389 |
die sprintf( "Error: Unable to upload file '%s' to server (ID: %s)\n", $filename, $destination_server_id ); |
392 |
die sprintf( "Error: Unable to upload file '%s' to server (ID: %s)\n", $filename, $destination_server_id ); |
390 |
} |
393 |
} |
391 |
- |
|
|