sxmo_init: ensure XDG_STATE_HOME exists

`sxmo_log()` logs to `$XDG_STATE_HOME/sxmo.log` (`~/.local/state/sxmo.log`),
so sxmo needs to ensure that directory exists to have reliable logging.

Signed-off-by: Anjandev Momi <anjan@momi.ca>
This commit is contained in:
2023-07-01 00:50:14 +00:00
committed by Anjandev Momi
parent 1a15c8dd11
commit d1787481a2

View File

@@ -167,6 +167,10 @@ _sxmo_prepare_dirs() {
mkdir -p "$XDG_CACHE_HOME/sxmo/" mkdir -p "$XDG_CACHE_HOME/sxmo/"
chmod 700 "$XDG_CACHE_HOME" chmod 700 "$XDG_CACHE_HOME"
chown "$uid:$gid" "$XDG_CACHE_HOME" chown "$uid:$gid" "$XDG_CACHE_HOME"
mkdir -p "$XDG_STATE_HOME"
chmod 700 "$XDG_STATE_HOME"
chown "$uid:$gid" "$XDG_STATE_HOME"
} }
_sxmo_grab_session _sxmo_grab_session