From 4905c8fed12d0514ca06cd20e49dcdf270b33010 Mon Sep 17 00:00:00 2001 From: Gabriele Musco Date: Thu, 5 Dec 2024 07:09:00 +0100 Subject: [PATCH] fix: create openxr config dir when starting profile --- src/file_builders/active_runtime_json.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/file_builders/active_runtime_json.rs b/src/file_builders/active_runtime_json.rs index 3cc7138..8804a4d 100644 --- a/src/file_builders/active_runtime_json.rs +++ b/src/file_builders/active_runtime_json.rs @@ -7,7 +7,7 @@ use crate::{ use anyhow::bail; use serde::{Deserialize, Serialize}; use std::{ - fs::{remove_file, rename}, + fs::{create_dir_all, remove_file, rename}, os::unix::fs::symlink, path::{Path, PathBuf}, }; @@ -112,6 +112,7 @@ pub fn set_current_active_runtime_to_profile(profile: &Profile) -> anyhow::Resul let profile_openxr_json = profile.openxr_json_path(); if profile_openxr_json.is_file() { + create_dir_all(dest.parent().unwrap())?; symlink(profile_openxr_json, &dest)?; } else { warn!("profile openxr json file doesn't exist");