From 33311ec8563f3d02bc61b278858f0773190fe0a5 Mon Sep 17 00:00:00 2001 From: harsh4723 Date: Sat, 26 Oct 2024 19:25:58 +0530 Subject: [PATCH] fix: use case insensitive for file search --- code/go/0chain.net/blobbercore/reference/ref.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/go/0chain.net/blobbercore/reference/ref.go b/code/go/0chain.net/blobbercore/reference/ref.go index 6c50cf1b3..9be3a19f0 100644 --- a/code/go/0chain.net/blobbercore/reference/ref.go +++ b/code/go/0chain.net/blobbercore/reference/ref.go @@ -283,7 +283,7 @@ func GetReferenceByLookupHashForDownload(ctx context.Context, allocationID, path func GetReferencesByName(ctx context.Context, allocationID, name string) (refs []*Ref, err error) { db := datastore.GetStore().GetTransaction(ctx) err = db.Model(&Ref{}). - Where("allocation_id = ? AND name LIKE ?", allocationID, "%"+name+"%"). + Where("allocation_id = ? AND name ILIKE ?", allocationID, "%"+name+"%"). Limit(20). Find(&refs).Error if err != nil {