1
0
Fork 0
mirror of https://github.com/chrislusf/seaweedfs synced 2024-07-08 18:16:50 +02:00

avoid integer overflow

fix https://github.com/chrislusf/seaweedfs/issues/2254
This commit is contained in:
Chris Lu 2021-08-11 22:22:49 -07:00
parent 5516fa8e80
commit bfac55e6c0

View file

@ -35,7 +35,9 @@ func NewFilerRemoteStorage() (rs *FilerRemoteStorage) {
func (rs *FilerRemoteStorage) LoadRemoteStorageConfigurationsAndMapping(filer *Filer) (err error) {
// execute this on filer
entries, _, err := filer.ListDirectoryEntries(context.Background(), DirectoryEtcRemote, "", false, math.MaxInt64, "", "", "")
limit := int64(math.MaxInt32)
entries, _, err := filer.ListDirectoryEntries(context.Background(), DirectoryEtcRemote, "", false, limit, "", "", "")
if err != nil {
if err == filer_pb.ErrNotFound {
return nil