Bugzilla – Attachment 172178 Details for
Bug 36766
Add command-line utility to SFTP a file to a remote server
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36766: Only list the file basename as the SFTP put destination
Bug-36766-Only-list-the-file-basename-as-the-SFTP-.patch (text/plain), 1.39 KB, created by
Kyle M Hall (khall)
on 2024-09-27 20:26:54 UTC
(
hide
)
Description:
Bug 36766: Only list the file basename as the SFTP put destination
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2024-09-27 20:26:54 UTC
Size:
1.39 KB
patch
obsolete
>From 7a782640932b895611da204c3a91405b8dba7647 Mon Sep 17 00:00:00 2001 >From: Alex Buckley <alexbuckley@catalyst.net.nz> >Date: Fri, 17 May 2024 02:17:55 +0000 >Subject: [PATCH] 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> >--- > misc/cronjobs/sftp_file.pl | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/misc/cronjobs/sftp_file.pl b/misc/cronjobs/sftp_file.pl >index 74cec5188fd..5fc7c1a7e29 100755 >--- a/misc/cronjobs/sftp_file.pl >+++ b/misc/cronjobs/sftp_file.pl >@@ -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'; >-- >2.39.5 (Apple Git-154)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 36766
:
166085
|
166089
|
166471
|
166859
|
172151
|
172152
|
172153
|
172154
|
172161
|
172162
|
172163
|
172164
|
172176
|
172177
| 172178 |
172179
|
172180
|
172181
|
173596