Explorar el Código

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 hace 4 meses
padre
commit
6bb397872b
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  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);
         }