sshj icon indicating copy to clipboard operation
sshj copied to clipboard

Suggest strategy for enumerating remote files to be downloaded using SFTPFileTransfer

Open greyp9 opened this issue 1 year ago • 1 comments

At this point in SSHJ, there is special logic to account for SFTP servers that do not supply file type information.

https://github.com/hierynomus/sshj/blob/master/src/main/java/net/schmizz/sshj/sftp/SFTPFileTransfer.java#L124-L127

That is, if the file type is UNKNOWN, the file is downloaded as if the type were REGULAR.

Seeking insight as to whether remote file enumeration logic should similarly ignore remote.getAttributes().getType() == UNKNOWN.

greyp9 avatar Jun 08 '23 22:06 greyp9

This server behavior was observed using current Windows SolarWinds SFTP server. https://www.solarwinds.com/free-tools/free-sftp-server

greyp9 avatar Jun 08 '23 22:06 greyp9