pkg / sftp

SFTP support for the go.crypto/ssh package
BSD 2-Clause "Simplified" License
1.5k stars 380 forks source link

fix bug:RemoveDirectory return SSH_FX_FAILURE. #465

Closed aschoolboy closed 3 years ago

aschoolboy commented 3 years ago

fix bug:if the directory contains files or directories, RemoveDirectory will return SSH_FX_FAILURE.

puellanivis commented 3 years ago

… An error will be returned if no directory with the specified path exists, or if the specified directory is not empty, or if the path specified a file system object other than a directory. The server responds to this request with a SSH_FXP_STATUS message.

https://datatracker.ietf.org/doc/html/draft-ietf-secsh-filexfer-02

Code is already working as intended and according to the standard.