From df51e0c042c1b5fe6ef62f3eafdcc3b9961d0ee3 Mon Sep 17 00:00:00 2001 From: chrislu Date: Tue, 15 Feb 2022 16:18:36 -0800 Subject: [PATCH] mongodb: remove ErrNoDocuments checking since it is only for creating single record, not for querying --- weed/filer/mongodb/mongodb_store.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/weed/filer/mongodb/mongodb_store.go b/weed/filer/mongodb/mongodb_store.go index 7f2da7047..e84d7c9a7 100644 --- a/weed/filer/mongodb/mongodb_store.go +++ b/weed/filer/mongodb/mongodb_store.go @@ -200,10 +200,6 @@ func (store *MongodbStore) ListDirectoryEntries(ctx context.Context, dirPath uti for cur.Next(ctx) { var data Model err = cur.Decode(&data) - if err == mongo.ErrNoDocuments { - err = nil - break - } if err != nil { break }