Avoid manual construction of paths.

This commit is contained in:
r-vdp 2023-03-22 15:48:27 +01:00
parent 19edbdddb1
commit 02a0e81d6d
No known key found for this signature in database

View file

@ -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}");