From f290bd7170487715115a93011078cf7d9fedd2de Mon Sep 17 00:00:00 2001 From: John Date: Thu, 14 May 2020 21:25:54 +0800 Subject: [PATCH] fix issue in http.File implements for package gres --- os/gres/gres_http_file.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)