From ab3c35c629266d804c5f0c29839ddcfb9a2cceb7 Mon Sep 17 00:00:00 2001 From: Andy Bauer Date: Fri, 4 Mar 2016 17:21:32 -0600 Subject: [PATCH] fix missing Net::SFTP::Foreign::debug warning --- scripts/zmfilter.pl.in | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/zmfilter.pl.in b/scripts/zmfilter.pl.in index 1db114d9d..2bf32b528 100755 --- a/scripts/zmfilter.pl.in +++ b/scripts/zmfilter.pl.in @@ -935,10 +935,12 @@ sub uploadArchFile if $Config{ZM_UPLOAD_PORT}; $sftpOptions{timeout} = $Config{ZM_UPLOAD_TIMEOUT} if $Config{ZM_UPLOAD_TIMEOUT}; - $sftpOptions{more} = [ '-o'=>'StrictHostKeyChecking=no' ] + my @more_ssh_args; + push @more_ssh_args, ['-o'=>'StrictHostKeyChecking=no'] if ! $Config{ZM_UPLOAD_STRICT}; - $Net::SFTP::Foreign::debug = -1 + push @more_ssh_args, ['-v'] if $Config{ZM_UPLOAD_DEBUG}; + $sftpOptions{more} = [@more_ssh_args]; my $sftp = Net::SFTP::Foreign->new( $Config{ZM_UPLOAD_HOST}, %sftpOptions ); if ( $sftp->error ) {