From c05e9ea089e84151da8da74313247c89fe44c9ea Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Thu, 4 Apr 2024 12:56:52 -0700 Subject: [PATCH] fix(wm): always check/ensure datadir creation A user reported in an issue that their komorebi data dir did not persist across reboots. While there have not been any other reports of this type of system behaviour, it's worth just doing a mkdir -p equivalent call whenever komorebi.exe is starting to ensure that the socket files can always be created no matter what. re #731 --- komorebi/src/main.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/komorebi/src/main.rs b/komorebi/src/main.rs index 06950b93..ca39ea9b 100644 --- a/komorebi/src/main.rs +++ b/komorebi/src/main.rs @@ -34,6 +34,7 @@ use komorebi::window_manager::WindowManager; use komorebi::windows_api::WindowsApi; use komorebi::winevent_listener; use komorebi::CUSTOM_FFM; +use komorebi::DATA_DIR; use komorebi::HOME_DIR; use komorebi::INITIAL_CONFIGURATION_LOADED; use komorebi::SESSION_ID; @@ -199,6 +200,8 @@ fn main() -> Result<()> { Option::from, ); + std::fs::create_dir_all(&*DATA_DIR)?; + let wm = if let Some(config) = &static_config { tracing::info!( "creating window manager from static configuration file: {}",