This is apparently a server-side bug (a serious SFTP protocol violation). The proper solution is to report it to the server vendor to have it fixed.
If they are uncooperative, you might be able to work around the issue by registering ListItemReceived
event on Sftp
object, and calling Abort()
on SftpListItemReceivedEventArgs
when the duplicate item is detected.