simplify code
This commit is contained in:
parent
461e62fcdf
commit
ce55dbbcc6
|
@ -132,10 +132,9 @@ impl ChunkStore {
|
||||||
let base: PathBuf = path.into();
|
let base: PathBuf = path.into();
|
||||||
let chunk_dir = Self::chunk_dir(&base);
|
let chunk_dir = Self::chunk_dir(&base);
|
||||||
|
|
||||||
let metadata = match std::fs::metadata(&chunk_dir) {
|
if let Err(err) = std::fs::metadata(&chunk_dir) {
|
||||||
Ok(data) => data,
|
bail!("unable to open chunk store {:?} - {}", chunk_dir, err);
|
||||||
Err(err) => bail!("unable to open chunk store {:?} - {}", chunk_dir, err),
|
}
|
||||||
};
|
|
||||||
|
|
||||||
let mut lockfile_path = base.clone();
|
let mut lockfile_path = base.clone();
|
||||||
lockfile_path.push(".lock");
|
lockfile_path.push(".lock");
|
||||||
|
|
Loading…
Reference in New Issue