From ab13962f6ec4557d4864ad255ca2f07158249fc0 Mon Sep 17 00:00:00 2001 From: Marco Blessing Date: Mon, 26 Mar 2018 13:01:34 +0200 Subject: [PATCH] Fix FTP Connection Error (#29) * fixes #27 * fix var name typo * bump version --- appveyor.yml | 2 +- src/Connection/Connect-To.ps1 | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 1e8d9d4..1f5730f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,4 +1,4 @@ -version: 0.2.2.{build} +version: 0.2.3.{build} #branches: # only: diff --git a/src/Connection/Connect-To.ps1 b/src/Connection/Connect-To.ps1 index 31f405d..f869d22 100644 --- a/src/Connection/Connect-To.ps1 +++ b/src/Connection/Connect-To.ps1 @@ -182,7 +182,8 @@ function Connect-To { FtpMode = 'Passive' } try { - $Global:WinSCPSession = New-WinSCPSession @WinSCPConParams + $FTPSessionOption = New-WinSCPSessionOption @WinSCPConParams + $Global:WinSCPSession = New-WinSCPSession @FTPSessionOption } catch { throw "Could not connect to {0} using {1} protocol!" -f $RemoteHost, $Type