Don't append .index to core name autmatically
The array of string passed to load() is now full file names instead of Core / dataset names.
This commit is contained in:
@@ -138,9 +138,7 @@ impl DataBase {
|
||||
}
|
||||
|
||||
pub fn load_core(name: &str) -> Result<(Vec<Space>, Core), String> {
|
||||
let fn_index = format!("{}.index", name);
|
||||
|
||||
let mmap = DataBase::mmap_file(&fn_index)?;
|
||||
let mmap = DataBase::mmap_file(&name)?;
|
||||
|
||||
match bincode::deserialize(&mmap[..]) {
|
||||
Err(e) => Err(format!("Index deserialization error: {:?}", e)),
|
||||
|
||||
@@ -29,7 +29,7 @@ fn main() {
|
||||
let db;
|
||||
{
|
||||
info_time!("Loading database index");
|
||||
db = DataBase::load(&["10k"]).unwrap();
|
||||
db = DataBase::load(&["10k.index"]).unwrap();
|
||||
}
|
||||
|
||||
if true {
|
||||
|
||||
Reference in New Issue
Block a user