mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-01 09:47:22 +13:00
parent
da2b593d00
commit
40c95163ee
1 changed files with 2 additions and 7 deletions
|
@ -179,9 +179,7 @@ public bool UploadData(Stream localStream, string remotePath)
|
|||
{
|
||||
using (Stream remoteStream = client.OpenWrite(remotePath))
|
||||
{
|
||||
bool result = TransferData(localStream, remoteStream);
|
||||
remoteStream.Close();
|
||||
return result;
|
||||
return TransferData(localStream, remoteStream);
|
||||
}
|
||||
}
|
||||
catch (FtpCommandException e)
|
||||
|
@ -193,9 +191,7 @@ public bool UploadData(Stream localStream, string remotePath)
|
|||
|
||||
using (Stream remoteStream = client.OpenWrite(remotePath))
|
||||
{
|
||||
bool result = TransferData(localStream, remoteStream);
|
||||
remoteStream.Close();
|
||||
return result;
|
||||
return TransferData(localStream, remoteStream);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -271,7 +267,6 @@ public void DownloadFile(string remotePath, Stream localStream)
|
|||
using (Stream remoteStream = client.OpenRead(remotePath))
|
||||
{
|
||||
TransferData(remoteStream, localStream);
|
||||
remoteStream.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue