8000 Request server file list should not return io.EOF when n == 0 · Issue #240 · pkg/sftp · GitHub
[go: up one dir, main page]

Skip to content
Request server file list should not return io.EOF when n == 0 #240
@eikenb

Description

@eikenb

Currently the code wrapping/calling the FileLister handler will return an io.EOF (indicating the end of the list) when the underlying handler returns 0 entries. I've come upon a situation where it is possible to return 0 entries in one batch, but still possibly have more entries to send.

sftp/request.go

Line 273 in 6d8540e

if n == 0 {

This was originally put there as a safeguard, in case the underlying FileLister code was ill-behaved and didn't properly return io.EOF.

I'd like to remove this check but wanted to post about it first to give others a chance to raise issues.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0