Update SSH client to patched version
This commit is contained in:
@@ -47,9 +47,9 @@ namespace LeafWeb.Core.Remote
|
||||
private void Connect(PiscalLeafInput leafInput, BaseClient scp)
|
||||
{
|
||||
try
|
||||
{
|
||||
scp.Connect();
|
||||
}
|
||||
{
|
||||
scp.Connect();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
var message = $"Exception while connecting to client. Message: {ex.Message}";
|
||||
@@ -72,13 +72,20 @@ namespace LeafWeb.Core.Remote
|
||||
}
|
||||
}
|
||||
|
||||
private void CopyLeafInput(PiscalLeafInput leafInput, string directory)
|
||||
private void CopyLeafInput(PiscalLeafInput leafInput)
|
||||
{
|
||||
// copy files
|
||||
// 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
|
||||
using (var scp = GetScpClient())
|
||||
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))
|
||||
{
|
||||
_logger.Debug("Copying " + inputPath);
|
||||
@@ -96,9 +103,9 @@ namespace LeafWeb.Core.Remote
|
||||
if (string.IsNullOrEmpty(leafInput.PhotosyntheticType))
|
||||
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
|
||||
using (var ssh = GetSshClient())
|
||||
|
||||
Reference in New Issue
Block a user