aboutsummaryrefslogtreecommitdiff
path: root/weed/filer/filer_search.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/filer/filer_search.go')
-rw-r--r--weed/filer/filer_search.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/weed/filer/filer_search.go b/weed/filer/filer_search.go
index 2ee29be25..2e0336da8 100644
--- a/weed/filer/filer_search.go
+++ b/weed/filer/filer_search.go
@@ -3,6 +3,7 @@ package filer
import (
"context"
"github.com/chrislusf/seaweedfs/weed/util"
+ "math"
"path/filepath"
"strings"
)
@@ -27,6 +28,10 @@ func (f *Filer) ListDirectoryEntries(ctx context.Context, p util.FullPath, start
return true
})
+ if limit == math.MaxInt64 {
+ limit = math.MaxInt64 - 1
+ }
+
hasMore = int64(len(entries)) >= limit+1
if hasMore {
entries = entries[:limit]