Update SSH client to patched version
This commit is contained in:
+3
-3
@@ -62,9 +62,9 @@
|
|||||||
<HintPath>..\packages\MlkPwgen.0.2.0.0\lib\net45\MlkPwgen.dll</HintPath>
|
<HintPath>..\packages\MlkPwgen.0.2.0.0\lib\net45\MlkPwgen.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Renci.SshNet, Version=2013.4.7.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="Renci.SshNet, Version=2016.1.0.0, Culture=neutral, PublicKeyToken=1cee9f8bde3db106, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\SSH.NET.2013.4.7\lib\net40\Renci.SshNet.dll</HintPath>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<Private>True</Private>
|
<HintPath>..\References\Renci.SshNet.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||||
|
|||||||
@@ -72,13 +72,20 @@ namespace LeafWeb.Core.Remote
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CopyLeafInput(PiscalLeafInput leafInput, string directory)
|
private void CopyLeafInput(PiscalLeafInput leafInput)
|
||||||
{
|
{
|
||||||
|
// create directory
|
||||||
|
using (var sshClient = GetSshClient())
|
||||||
|
{
|
||||||
|
sshClient.Connect();
|
||||||
|
var runCommand = sshClient.RunCommand($"mkdir {BaseDirectory}/{leafInput.PiscalDirectoryName}");
|
||||||
|
sshClient.RunCommand($"mkdir {BaseDirectory}/{leafInput.PiscalDirectoryName}/input");
|
||||||
|
}
|
||||||
// copy files
|
// copy files
|
||||||
using (var scp = GetScpClient())
|
using (var scp = GetScpClient())
|
||||||
foreach (var file in leafInput.InputFiles)
|
foreach (var file in leafInput.InputFiles)
|
||||||
{
|
{
|
||||||
var inputPath = $"{directory}/input/{file.Filename}";
|
var inputPath = $"{BaseDirectory}/{leafInput.PiscalDirectoryName}/input/{file.Filename}";
|
||||||
using (var stream = new MemoryStream(file.Contents))
|
using (var stream = new MemoryStream(file.Contents))
|
||||||
{
|
{
|
||||||
_logger.Debug("Copying " + inputPath);
|
_logger.Debug("Copying " + inputPath);
|
||||||
@@ -96,9 +103,9 @@ namespace LeafWeb.Core.Remote
|
|||||||
if (string.IsNullOrEmpty(leafInput.PhotosyntheticType))
|
if (string.IsNullOrEmpty(leafInput.PhotosyntheticType))
|
||||||
throw new PiscalClientException(leafInput.LeafInputId, "No PhotosyntheticType set");
|
throw new PiscalClientException(leafInput.LeafInputId, "No PhotosyntheticType set");
|
||||||
|
|
||||||
var inputDirectory = $"{BaseDirectory}/{leafInput.PiscalDirectoryName}";
|
//var inputDirectory = $"{BaseDirectory}/{leafInput.PiscalDirectoryName}";
|
||||||
|
|
||||||
CopyLeafInput(leafInput, inputDirectory);
|
CopyLeafInput(leafInput);
|
||||||
|
|
||||||
// begin processing
|
// begin processing
|
||||||
using (var ssh = GetSshClient())
|
using (var ssh = GetSshClient())
|
||||||
|
|||||||
@@ -7,5 +7,4 @@
|
|||||||
<package id="log4net" version="2.0.8" targetFramework="net45" />
|
<package id="log4net" version="2.0.8" targetFramework="net45" />
|
||||||
<package id="MathNet.Numerics" version="4.5.1" targetFramework="net45" />
|
<package id="MathNet.Numerics" version="4.5.1" targetFramework="net45" />
|
||||||
<package id="MlkPwgen" version="0.2.0.0" targetFramework="net45" />
|
<package id="MlkPwgen" version="0.2.0.0" targetFramework="net45" />
|
||||||
<package id="SSH.NET" version="2013.4.7" targetFramework="net45" />
|
|
||||||
</packages>
|
</packages>
|
||||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user