mirror of
https://github.com/MarginaliaSearch/MarginaliaSearch.git
synced 2025-02-24 05:18:58 +00:00
(index) Correct strange close handling of PositionsFileConstructor
This commit is contained in:
parent
934af0dd4b
commit
6e47eae903
@ -63,8 +63,10 @@ public class PositionsFileConstructor implements AutoCloseable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void close() throws IOException {
|
public void close() throws IOException {
|
||||||
while (workBuffer.position() < workBuffer.limit()) {
|
if (workBuffer.hasRemaining()) {
|
||||||
workBuffer.flip();
|
workBuffer.flip();
|
||||||
|
|
||||||
|
while (workBuffer.hasRemaining())
|
||||||
channel.write(workBuffer);
|
channel.write(workBuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user