mirror of
https://github.com/ShareX/ShareX.git
synced 2024-07-08 07:56:40 +12:00
Merge branch 'master' of github.com:ShareX/ShareX
This commit is contained in:
commit
42d16e3188
|
@ -179,7 +179,9 @@ public bool UploadData(Stream localStream, string remotePath)
|
|||
{
|
||||
using (Stream remoteStream = client.OpenWrite(remotePath))
|
||||
{
|
||||
return TransferData(localStream, remoteStream);
|
||||
bool result = TransferData(localStream, remoteStream);
|
||||
remoteStream.Close();
|
||||
return result;
|
||||
}
|
||||
}
|
||||
catch (FtpCommandException e)
|
||||
|
@ -191,7 +193,9 @@ public bool UploadData(Stream localStream, string remotePath)
|
|||
|
||||
using (Stream remoteStream = client.OpenWrite(remotePath))
|
||||
{
|
||||
return TransferData(localStream, remoteStream);
|
||||
bool result = TransferData(localStream, remoteStream);
|
||||
remoteStream.Close();
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -267,6 +271,7 @@ public void DownloadFile(string remotePath, Stream localStream)
|
|||
using (Stream remoteStream = client.OpenRead(remotePath))
|
||||
{
|
||||
TransferData(remoteStream, localStream);
|
||||
remoteStream.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue