mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-06-29 16:20:46 +00:00
Patch a tricky bug in parsing of json header and save the last sequence from files
Former-commit-id: bfe3d0e9eb8e65113699d535bd1d9a5fe0d3ce1d
This commit is contained in:
@ -106,6 +106,16 @@ func ReadSeqFileChunk(reader io.Reader,
|
||||
}
|
||||
}
|
||||
|
||||
if err != nil && err != io.EOF && err != io.ErrUnexpectedEOF {
|
||||
log.Fatalf("Error reading data from file : %s", err)
|
||||
}
|
||||
|
||||
// Send the last chunk to the channel
|
||||
if len(buff) > 0 {
|
||||
io := bytes.NewBuffer(slices.Clone(buff))
|
||||
chunk_channel <- SeqFileChunk{io, i}
|
||||
}
|
||||
|
||||
// Close the readers channel when the end of the file is reached
|
||||
close(chunk_channel)
|
||||
}()
|
||||
|
Reference in New Issue
Block a user