Make easier to interact with compacted databases

This commit is contained in:
Clément Renault 2019-11-17 20:01:02 +01:00
parent ebf620c7f9
commit f873761a27
No known key found for this signature in database
GPG Key ID: 0151CDAB43460DAE

View File

@ -195,8 +195,9 @@ fn index_command(command: IndexCommand, database: Database) -> Result<(), Box<dy
);
if let Some(path) = command.compact_to_path {
fs::create_dir_all(&path)?;
let start = Instant::now();
let _file = database.copy_and_compact_to_path(&path)?;
let _file = database.copy_and_compact_to_path(path.join("data.mdb"))?;
println!(
"database compacted in {:.2?} at: {:?}",
start.elapsed(),