diff options
author | Victor Toso <victortoso@redhat.com> | 2020-07-23 09:51:57 +0200 |
---|---|---|
committer | Victor Toso <me@victortoso.com> | 2020-07-23 08:20:04 +0000 |
commit | 9b61d87f3b3550134a49b7f54367b146f8e03710 (patch) | |
tree | ea1266ab33a5c9f213ec06c4485d51b843ed986f | |
parent | 8de41d7c6bf1d105ca5eefba5537a6c784467cdf (diff) | |
download | grilo-9b61d87f3b3550134a49b7f54367b146f8e03710.tar.gz |
registry: do not load .so* files or folders
Latest meson is creating a .so.p temporary folder to lua-factory plugin
and current code in grl-registry would try to load all .so* files. This
patch makes sure that it only tries to load files with .so suffix
(actually, G_MODULE_SUFFIX that could be different in other platforms)
Fixes:
Bail out! Grilo-FATAL-WARNING: [registry]
../subprojects/grilo/src/grl-registry.c:1210: Failed to open module:
/builds/victortoso/grilo-plugins/_build/src/lua-factory/libgrlluafactory.so.p: cannot read file data: Is a directory
-rw-r--r-- | src/grl-registry.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/grl-registry.c b/src/grl-registry.c index c202992..f4a3ed1 100644 --- a/src/grl-registry.c +++ b/src/grl-registry.c @@ -1420,7 +1420,7 @@ grl_registry_load_plugin_directory (GrlRegistry *registry, while ((entry = g_dir_read_name (dir)) != NULL) { filename = g_build_filename (path, entry, NULL); - if (g_strrstr (filename, "." G_MODULE_SUFFIX) == NULL) { + if (!g_str_has_suffix (filename, "." G_MODULE_SUFFIX)) { g_free (filename); continue; } |