Avoid manual construction of paths.
This commit is contained in:
parent
19edbdddb1
commit
02a0e81d6d
1 changed files with 5 additions and 1 deletions
|
|
@ -66,7 +66,11 @@ struct CreatedEtcFile {
|
|||
|
||||
pub fn activate(store_path: &StorePath, ephemeral: bool) -> Result<()> {
|
||||
log::info!("Reading etc file definitions...");
|
||||
let file = fs::File::open(Path::new(&store_path.store_path).join("etcFiles/etcFiles.json"))?;
|
||||
let file = fs::File::open(
|
||||
Path::new(&store_path.store_path)
|
||||
.join("etcFiles")
|
||||
.join("etcFiles.json"),
|
||||
)?;
|
||||
let reader = io::BufReader::new(file);
|
||||
let config: EtcFilesConfig = serde_json::from_reader(reader)?;
|
||||
log::debug!("{config}");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue