Browse Source

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
thegame4craft 4 months ago
parent
commit
6bb397872b
1 changed files with 5 additions and 0 deletions
  1. 5 0
      src/Renci.SshNet/ScpClient.cs

+ 5 - 0
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);
         }