You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SftpClient.Create thows SshException instead of SftpPathNotFoundException when directories don't exist #566
SftpClient.Create documentation states it throws SftpPathNotFoundException if
The specified path is invalid, or its directory was not found on the remote host.
However, when I try to create a file at an non-existing path I get SshException with "Folder not found" message with stack trace starting at SftpSession.RequestOpen. Not only this is confusing and doesn't match documented behavior, but also SshException is too generic to handle this particular case (e.g. create the directory and try again).
Activity
Rob-Hague commentedon Oct 19, 2026
2025.1.0 / #1716 improved this to the extent the protocol allows