Sanitize device names in daemon (#524)

This commit is contained in:
Nik Chatzinikolaou 2022-11-01 11:44:43 +02:00 committed by GitHub
parent 3798be2e46
commit df91ba60c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -45,7 +45,7 @@ from inputremapper.configs.preset import Preset
from inputremapper.configs.global_config import global_config from inputremapper.configs.global_config import global_config
from inputremapper.configs.system_mapping import system_mapping from inputremapper.configs.system_mapping import system_mapping
from inputremapper.groups import groups 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.macros.macro import macro_variables
from inputremapper.injection.global_uinputs import global_uinputs from inputremapper.injection.global_uinputs import global_uinputs
@ -468,7 +468,7 @@ class Daemon:
preset_path = PurePath( preset_path = PurePath(
self.config_dir, self.config_dir,
"presets", "presets",
group.name, sanitize_path_component(group.name),
f"{preset}.json", f"{preset}.json",
) )