diff --git a/PoshSSH/PoshSSH/GetScpFolder.cs b/PoshSSH/PoshSSH/GetScpFolder.cs index 7eed070..a247c00 100644 --- a/PoshSSH/PoshSSH/GetScpFolder.cs +++ b/PoshSSH/PoshSSH/GetScpFolder.cs @@ -320,7 +320,7 @@ protected override void ProcessRecord() { if (_errorOnUntrusted) { throw new System.Security.SecurityException("SSH fingerprint mismatch for host " + computer1); } - + int choice; if (_acceptkey) { @@ -414,8 +414,9 @@ protected override void ProcessRecord() { try { - var localfullPath = Path.GetFullPath(_localfolder); - WriteVerbose("Downloading " + _remotefolder); + var localfullPath = this.SessionState.Path.GetUnresolvedProviderPathFromPSPath(_localfolder); + WriteVerbose("Downloading From " + _remotefolder); + WriteVerbose("Saving as " + localfullPath); var dirinfo = new DirectoryInfo(@localfullPath); client.Download(_remotefolder, dirinfo); WriteVerbose("Finished downloading.");