From 6bb397872b3a064109780f68735d5c4586e992fd Mon Sep 17 00:00:00 2001 From: thegame4craft <48205247+thegame4craft@users.noreply.github.com> Date: Fri, 20 Jun 2025 08:53:51 +0200 Subject: [PATCH] scp: notify for uploading finished when uploaded an empty file (#1658) * scp: add flag to notify for uploading finished when uploaded an empty file * remove notifyOnEmptyFile Flag --- src/Renci.SshNet/ScpClient.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Renci.SshNet/ScpClient.cs b/src/Renci.SshNet/ScpClient.cs index 56330f2e..18fc9759 100644 --- a/src/Renci.SshNet/ScpClient.cs +++ b/src/Renci.SshNet/ScpClient.cs @@ -579,6 +579,11 @@ namespace Renci.SshNet read = source.Read(buffer, 0, buffer.Length); } + if (totalLength == 0 && totalRead == 0) + { + RaiseUploadingEvent(remoteFileName, totalLength, totalRead); + } + SendSuccessConfirmation(channel); CheckReturnCode(input); }