diff --git a/indexer/src/blocks_chunks.rs b/indexer/src/blocks_chunks.rs index b5155fe..15a346f 100644 --- a/indexer/src/blocks_chunks.rs +++ b/indexer/src/blocks_chunks.rs @@ -83,6 +83,9 @@ fn write_and_compress_chunk_in_file( chunks_folder_path: &Path, ) -> Result<(), std::io::Error> { log::info!("blocks_chunk_{}: {} bytes", chunk_index, chunk.len()); + if !chunks_folder_path.exists() { + std::fs::create_dir(chunks_folder_path)?; + } let file = std::fs::File::create(chunks_folder_path.join(format!("_{}", chunk_index)))?; let mut e = ZlibEncoder::new(file, Compression::new(3)); e.write_all(chunk)?;