Fix cache bug
This commit is contained in:
parent
be130790ea
commit
0b2e2bcb4a
|
|
@ -1,3 +1,4 @@
|
|||
use std::env::temp_dir;
|
||||
use std::fmt::Debug;
|
||||
use std::fs;
|
||||
use std::path::PathBuf;
|
||||
|
|
@ -38,8 +39,7 @@ impl FuelTank {
|
|||
U: DeserializeOwned, U: Pump<T>
|
||||
{
|
||||
let path = PathBuf::new()
|
||||
.join(home_dir().ok_or(ManifoldError::from("No home dir"))?)
|
||||
.join(".local")
|
||||
.join(temp_dir())
|
||||
.join(format!("manifold-{}-cache-{}.json", self.cache_name.clone().unwrap(), CACHE_VERSION));
|
||||
|
||||
let mut fuel = match self.cache_mode {
|
||||
|
|
@ -50,6 +50,7 @@ impl FuelTank {
|
|||
debug!("Cache path: {:?}", &path);
|
||||
fs::OpenOptions::new()
|
||||
.read(true)
|
||||
.write(true)
|
||||
.create(true)
|
||||
.open(&path)
|
||||
.map_err(|e| {
|
||||
|
|
|
|||
Loading…
Reference in New Issue