diff --git a/crates/brk_computer/src/lib.rs b/crates/brk_computer/src/lib.rs index 7b342ba32..a12ba3a2f 100644 --- a/crates/brk_computer/src/lib.rs +++ b/crates/brk_computer/src/lib.rs @@ -32,6 +32,7 @@ use states::*; #[derive(Clone)] pub struct Computer { + file: Arc, fetcher: Option, pub vecs: all::Vecs, } @@ -65,6 +66,7 @@ impl Computer { &states_path, )?, fetcher, + file, }) } } @@ -78,6 +80,9 @@ impl Computer { ) -> color_eyre::Result<()> { info!("Computing..."); self.vecs - .compute(indexer, starting_indexes, self.fetcher.as_mut(), exit) + .compute(indexer, starting_indexes, self.fetcher.as_mut(), exit)?; + self.file.flush()?; + self.file.punch_holes()?; + Ok(()) } }