diff options
Diffstat (limited to 'weed/filer/mongodb/mongodb_store.go')
| -rw-r--r-- | weed/filer/mongodb/mongodb_store.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/filer/mongodb/mongodb_store.go b/weed/filer/mongodb/mongodb_store.go index 2549b6029..2e9556f1f 100644 --- a/weed/filer/mongodb/mongodb_store.go +++ b/weed/filer/mongodb/mongodb_store.go @@ -190,7 +190,7 @@ func (store *MongodbStore) ListDirectoryEntries(ctx context.Context, dirPath uti "$gte": startFileName, } } - optLimit := int64(limit+1) + optLimit := int64(limit + 1) opts := &options.FindOptions{Limit: &optLimit, Sort: bson.M{"name": 1}} cur, err := store.connect.Database(store.database).Collection(store.collectionName).Find(ctx, where, opts) for cur.Next(ctx) { @@ -212,7 +212,7 @@ func (store *MongodbStore) ListDirectoryEntries(ctx context.Context, dirPath uti entries = append(entries, entry) } - hasMore = int64(len(entries)) == limit + 1 + hasMore = int64(len(entries)) == limit+1 if hasMore { entries = entries[:limit] } |
