Skip to content

Commit 0d2007e

Browse files
committed
Fix file name could not be searched if the file was not a text file when using the Bleve indexer.
1 parent a4df01b commit 0d2007e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/indexer/code/bleve/bleve.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ func (b *Indexer) addUpdate(ctx context.Context, batchWriter git.WriteCloserErro
191191
return err
192192
} else if !typesniffer.DetectContentType(fileContents).IsText() {
193193
// FIXME: UTF-16 files will probably fail here
194-
return nil
194+
fileContents = make([]byte, 0)
195195
}
196196

197197
if _, err = batchReader.Discard(1); err != nil {

0 commit comments

Comments
 (0)