WpLookupDirs: remove the flag for looking into G_TEST_SRCDIR
Instead, make it so that WIREPLUMBER_*_DIR environment variables can contain a list of directories to look into. This is safer and, as a bonus, allows for more control over the lookup directories. Using the G_TEST_SRCDIR variable can cause problems for tests of other projects that use libwireplumber and may also lead to unexpected behavior by not being obvious that this causes wireplumber to skip looking in its standard directories... This also brings back WIREPLUMBER_CONFIG_DIR, which is going to be needed again for the upcoming WpConf changes.
This commit is contained in:
@@ -40,7 +40,6 @@ wp_lua_scripting_package_searcher (lua_State *L)
|
||||
g_autoptr (GError) error = NULL;
|
||||
g_autofree gchar *filename = g_strdup_printf ("%s.lua", name);
|
||||
g_autofree gchar *script = wp_find_file (
|
||||
WP_LOOKUP_DIR_ENV_TEST_SRCDIR |
|
||||
WP_LOOKUP_DIR_ENV_DATA |
|
||||
WP_LOOKUP_DIR_XDG_CONFIG_HOME |
|
||||
WP_LOOKUP_DIR_ETC |
|
||||
@@ -144,7 +143,6 @@ find_script (const gchar * script, WpCore *core)
|
||||
return g_strdup (script);
|
||||
|
||||
return wp_find_file (WP_LOOKUP_DIR_ENV_DATA |
|
||||
WP_LOOKUP_DIR_ENV_TEST_SRCDIR |
|
||||
WP_LOOKUP_DIR_XDG_CONFIG_HOME |
|
||||
WP_LOOKUP_DIR_ETC |
|
||||
WP_LOOKUP_DIR_PREFIX_SHARE,
|
||||
|
Reference in New Issue
Block a user