Skip to content

Commit

Permalink
fix(wm): always check/ensure datadir creation
Browse files Browse the repository at this point in the history
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
  • Loading branch information
LGUG2Z committed Apr 4, 2024
1 parent 37aa99a commit c05e9ea
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions komorebi/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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: {}",
Expand Down

0 comments on commit c05e9ea

Please sign in to comment.