diff --git a/os/gres/gres_http_file.go b/os/gres/gres_http_file.go index c35554268..d56edeca1 100644 --- a/os/gres/gres_http_file.go +++ b/os/gres/gres_http_file.go @@ -20,7 +20,7 @@ func (f *File) Close() error { func (f *File) Readdir(count int) ([]os.FileInfo, error) { files := f.resource.ScanDir(f.Name(), "*", false) if len(files) > 0 { - if count < 0 || count > len(files) { + if count <= 0 || count > len(files) { count = len(files) } infos := make([]os.FileInfo, count)