Fix issue with filelist returning to soon.

Don't return until FileLister returns io.EOF and 0 results. Fixes issue
where FileLister would return 0 results in one batch, but still have
more results to go.

Fixes #240
This commit is contained in:
John Eikenberry 2018-05-10 10:54:29 -07:00
parent 9c365cb4e3
commit e5e5f4de7e
1 changed files with 1 additions and 1 deletions

View File

@ -270,7 +270,7 @@ func filelist(h FileLister, r *Request, pkt requestPacket) responsePacket {
if err != nil && err != io.EOF {
return statusFromError(pkt, err)
}
if n == 0 {
if err == io.EOF && n == 0 {
return statusFromError(pkt, io.EOF)
}
dirname := filepath.ToSlash(path.Base(r.Filepath))