mirror of
https://github.com/Llewellynvdm/zoxide.git
synced 2024-12-29 12:32:40 +00:00
Set max DB size to 8 MiB
This commit is contained in:
parent
890185176e
commit
76dfaad9a1
@ -20,7 +20,10 @@ impl DB {
|
||||
let dirs = match File::open(&path) {
|
||||
Ok(file) => {
|
||||
let reader = BufReader::new(&file);
|
||||
bincode::deserialize_from(reader).context("could not deserialize database")?
|
||||
bincode::config()
|
||||
.limit(8 * 1024 * 1024) // only databases upto 8 MiB are supported
|
||||
.deserialize_from(reader)
|
||||
.context("could not deserialize database")?
|
||||
}
|
||||
Err(err) => match err.kind() {
|
||||
io::ErrorKind::NotFound => Vec::<Dir>::new(),
|
||||
|
Loading…
Reference in New Issue
Block a user