8000 Fix issue with filelist returning to soon. · etherscan-io/sftp@e5e5f4d · GitHub
[go: up one dir, main page]

Skip to content

Commit e5e5f4d

Browse files
author
John Eikenberry
committed
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 pkg#240
1 parent 9c365cb commit e5e5f4d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

request.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ func filelist(h FileLister, r *Request, pkt requestPacket) responsePacket {
270270
if err != nil && err != io.EOF {
271271
return statusFromError(pkt, err)
272272
}
273-
if n == 0 {
273+
if err == io.EOF && n == 0 {
274274
return statusFromError(pkt, io.EOF)
275275
}
276276
dirname := filepath.ToSlash(path.Base(r.Filepath))

0 commit comments

Comments
 (0)
0