summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2020-02-24 09:58:24 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2020-02-24 09:59:31 +1000
commit44988f411b1e598a47c4982ff1e035e72b093c98 (patch)
treeb82b543f2db063132667a0f6179c5d22a5d5e0bc
parent294298880d727c42320995435f752ab0dd975c00 (diff)
downloadlibinput-44988f411b1e598a47c4982ff1e035e72b093c98.tar.gz
tools: replay: mkdir /etc/libinput if it doesn't exist yet
Where we're replaying a device with quirks, those quirks will be placed into /etc/libinput/local-overrides.quirks. For that to work, /etc/libinput needs to exist so let's make it where required. https://bugzilla.redhat.com/show_bug.cgi?id=1806322 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rwxr-xr-xtools/libinput-replay1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/libinput-replay b/tools/libinput-replay
index 0f385205..fd6567e6 100755
--- a/tools/libinput-replay
+++ b/tools/libinput-replay
@@ -224,6 +224,7 @@ def setup_quirks(recording):
print('{} exists, please move it out of the way first'.format(overrides), file=sys.stderr)
sys.exit(1)
+ overrides.parent.mkdir(exist_ok=True)
with overrides.open('w+') as fd:
fd.write('# This file was generated by libinput replay\n')
fd.write('# Unless libinput replay is running right now, remove this file.\n')