From df91ba60c627bee67bdc6c5d7a7b68d801f88731 Mon Sep 17 00:00:00 2001 From: Nik Chatzinikolaou Date: Tue, 1 Nov 2022 11:44:43 +0200 Subject: [PATCH] Sanitize device names in daemon (#524) --- inputremapper/daemon.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inputremapper/daemon.py b/inputremapper/daemon.py index abbac091..c89ee446 100644 --- a/inputremapper/daemon.py +++ b/inputremapper/daemon.py @@ -45,7 +45,7 @@ from inputremapper.configs.preset import Preset from inputremapper.configs.global_config import global_config from inputremapper.configs.system_mapping import system_mapping from inputremapper.groups import groups -from inputremapper.configs.paths import get_config_path, USER +from inputremapper.configs.paths import get_config_path, sanitize_path_component, USER from inputremapper.injection.macros.macro import macro_variables from inputremapper.injection.global_uinputs import global_uinputs @@ -468,7 +468,7 @@ class Daemon: preset_path = PurePath( self.config_dir, "presets", - group.name, + sanitize_path_component(group.name), f"{preset}.json", )