Merge branch 'master' of github.com:ShareX/ShareX

This commit is contained in:
Jaex 2016-03-19 16:49:18 +02:00
commit 42d16e3188

View file

@ -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();
}
}
}