Quantcast
Channel: sshnet Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 1026

Created Unassigned: SSH.NET library encode the file name [2574]

$
0
0
I must download/upload a file using SSH.NET library. After I download/upload file I must delete the local/remote file. Everything works but the file name is encoded. I mean that for example, if I have a file named "New file", I download/upload a file named "New%20file". Now, if I download/upload the new file I obtain "New%25%20file" and again "New%252520file"... and so on... This is very problematic. How can I avoid to change the file name after I download/upload it?

Here the code I am using to download:

```
string fileName = base.Uri.GetFileName();
string fullPath = Path.Combine(pathFolder, fileName);

using (SftpClient client = new SftpClient(
new PasswordConnectionInfo(
base.Uri.Host, SftpFlowGateway.CONST_PORT_NUMBER,
base.Credential.UserName,
base.Credential.Password))
)
{
client.Connect();

using (FileStream fileStreamToDownload = new FileStream(fullPath, FileMode.Create))
{
client.DownloadFile(base.Uri.AbsolutePath, fileStreamToDownload);
}

client.Disconnect();
}
```

Thank you

Viewing all articles
Browse latest Browse all 1026

Trending Articles



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