diff --git a/src/Renci.SshNet/ScpClient.cs b/src/Renci.SshNet/ScpClient.cs index 56330f2ef..18fc97591 100644 --- a/src/Renci.SshNet/ScpClient.cs +++ b/src/Renci.SshNet/ScpClient.cs @@ -579,6 +579,11 @@ private void UploadFileContent(IChannelSession channel, Stream input, Stream sou read = source.Read(buffer, 0, buffer.Length); } + if (totalLength == 0 && totalRead == 0) + { + RaiseUploadingEvent(remoteFileName, totalLength, totalRead); + } + SendSuccessConfirmation(channel); CheckReturnCode(input); }