For issue 52,
This PR fixes the issue here, but it may be preferred to fix the issue in SSH.NET itself.
For issue 58,
Adjusting the way we open the file allows us to append data. Doing so we also need to exclude the usage of dest.SetLength( as it would truncate the destination file to the length of the source file.
Considering this I now wonder if there are situations when dataStream.Length may not exist or be accurate. Should this code check that dataStream.Length > 0 before it attempts to set the length? Not doing so could cause the entire file to be wiped out.
…ng left
Fixes
Issue #52 Issue #58
Description
For issue 52, This PR fixes the issue here, but it may be preferred to fix the issue in SSH.NET itself.
For issue 58, Adjusting the way we open the file allows us to append data. Doing so we also need to exclude the usage of
dest.SetLength(
as it would truncate the destination file to the length of the source file.Considering this I now wonder if there are situations when
dataStream.Length
may not exist or be accurate. Should this code check thatdataStream.Length
> 0 before it attempts to set the length? Not doing so could cause the entire file to be wiped out.