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

Closed Issue: SftpClient deletefile/delete fails after Exists check [1497]

$
0
0
I am trying to delete a file after checking for existance, Below is the code:

```
using (SftpClient sftp = new SftpClient(hostName, portNumber, userName, passWord))
{
sftp.Connect();
if(sftp.Exists(remotePath))
sftp.Delete(remotePath);
}
```

Logs show that the Exists command tries to download file and fails and when it gets to the Delete call server throws the "File in Use" error. ( not the "permission denied error" like the exception shows).

Thanx.
Comments: Ok, good,
Closing it now

Viewing all articles
Browse latest Browse all 1026

Trending Articles



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