tools: quirks: if we're executing from the builddir, use the git datadir

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2018-06-27 13:36:52 +10:00
parent 7e7d657dab
commit 25a6535570

View file

@ -162,8 +162,16 @@ main(int argc, char **argv)
/* Overriding the data dir means no custom override file */
if (!data_path) {
data_path = LIBINPUT_DATA_DIR;
override_file = LIBINPUT_DATA_OVERRIDE_FILE;
char *builddir;
builddir = tools_execdir_is_builddir();
if (builddir) {
data_path = LIBINPUT_DATA_SRCDIR;
free(builddir);
} else {
data_path = LIBINPUT_DATA_DIR;
override_file = LIBINPUT_DATA_OVERRIDE_FILE;
}
}
quirks = quirks_init_subsystem(data_path,