Quantcast
Channel: sshnet Discussions Rss Feed
Viewing all articles
Browse latest Browse all 1729

New Post: Does SftpClient.UploadFile overwrite existing files?

$
0
0

Here is a project that reproduce the problem.

I provided files in order to test, and a final.txt file, that correspond to the result.

You just need to change the connections information and file path.

http://cl.ly/2n2R0I0y0K3K

As you can see, this occurs only when the file uploaded is smaller than the existing file on the server (and with the same name ^^).

As I said before, if I use client.Open(filePath, FileMode.Created, FileAccess.Write) instead of client.OpenWrite(filePath), there is no problem.
But may be this is a wanted behavior.


Viewing all articles
Browse latest Browse all 1729

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>