apache / mina-sshd

Apache MINA sshd is a comprehensive Java library for client- and server-side SSH.
https://mina.apache.org/sshd-project/
Apache License 2.0
847 stars 353 forks source link

sftp readdir: determine file type from longname #491

Closed tomaswolf closed 2 months ago

tomaswolf commented 2 months ago

Some SFTP v3 servers do not include the file type flags in the permissions field of an SSH_FXP_NAME record. It this case use the "longname" field to extract this information, if possible.

Also give the SftpClientDirectoryScanner and the DirectoryScanner a flag to make them return not only regular files but also links and other items. (DirectoryScanner already returned links to regular files; SftpClientDirectoryScanner did not.)

Fixes #489.