mirror of
https://gitlab.com/veilid/veilid.git
synced 2024-12-26 15:59:24 -05:00
fix tablestore namespacing
This commit is contained in:
parent
9aa95f6857
commit
728038c197
@ -17,7 +17,15 @@ impl TableStoreDriver {
|
|||||||
let tablestoredir = c.table_store.directory.clone();
|
let tablestoredir = c.table_store.directory.clone();
|
||||||
std::fs::create_dir_all(&tablestoredir).map_err(VeilidAPIError::from)?;
|
std::fs::create_dir_all(&tablestoredir).map_err(VeilidAPIError::from)?;
|
||||||
|
|
||||||
let dbpath: PathBuf = [tablestoredir, String::from(table)].iter().collect();
|
let c = self.config.get();
|
||||||
|
let namespace = c.namespace.clone();
|
||||||
|
let dbpath: PathBuf = if namespace.is_empty() {
|
||||||
|
[tablestoredir, String::from(table)].iter().collect()
|
||||||
|
} else {
|
||||||
|
[tablestoredir, format!("{}_{}", namespace, table)]
|
||||||
|
.iter()
|
||||||
|
.collect()
|
||||||
|
};
|
||||||
Ok(dbpath)
|
Ok(dbpath)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user