mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-27 17:52:58 +02:00
giomodule: Allow overriding source directory gio modules are loaded from
When testing (and valgrinding) we need to have a known set of modules loaded. https://bugzilla.gnome.org/show_bug.cgi?id=711801
This commit is contained in:
committed by
Matthias Clasen
parent
be231c6be0
commit
e3babb3687
@@ -362,13 +362,23 @@ Gvfs is also heavily distributed and relies on a session bus to be present.
|
|||||||
</para>
|
</para>
|
||||||
</formalpara>
|
</formalpara>
|
||||||
|
|
||||||
|
<formalpara>
|
||||||
|
<title><envar>GIO_MODULE_DIR</envar></title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
When this environment variable is set to a path, GIO will load
|
||||||
|
modules from this alternate directory instead of the directory
|
||||||
|
built into GIO. This is useful when running tests, for example.
|
||||||
|
</para>
|
||||||
|
</formalpara>
|
||||||
|
|
||||||
<formalpara>
|
<formalpara>
|
||||||
<title><envar>GIO_EXTRA_MODULES</envar></title>
|
<title><envar>GIO_EXTRA_MODULES</envar></title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
When this environment variable is set to a path, or a set of
|
When this environment variable is set to a path, or a set of
|
||||||
paths separated by a colon, GIO will attempt to load
|
paths separated by a colon, GIO will attempt to load
|
||||||
modules from within the path.
|
additional modules from within the path.
|
||||||
</para>
|
</para>
|
||||||
</formalpara>
|
</formalpara>
|
||||||
|
|
||||||
|
@@ -1017,6 +1017,7 @@ _g_io_modules_ensure_loaded (void)
|
|||||||
static gboolean loaded_dirs = FALSE;
|
static gboolean loaded_dirs = FALSE;
|
||||||
const char *module_path;
|
const char *module_path;
|
||||||
GIOModuleScope *scope;
|
GIOModuleScope *scope;
|
||||||
|
const gchar *module_dir;
|
||||||
|
|
||||||
_g_io_modules_ensure_extension_points_registered ();
|
_g_io_modules_ensure_extension_points_registered ();
|
||||||
|
|
||||||
@@ -1045,7 +1046,11 @@ _g_io_modules_ensure_loaded (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Then load the compiled in path */
|
/* Then load the compiled in path */
|
||||||
g_io_modules_scan_all_in_directory_with_scope (GIO_MODULE_DIR, scope);
|
module_dir = g_getenv ("GIO_MODULE_DIR");
|
||||||
|
if (module_dir == NULL)
|
||||||
|
module_dir = GIO_MODULE_DIR;
|
||||||
|
|
||||||
|
g_io_modules_scan_all_in_directory_with_scope (module_dir, scope);
|
||||||
|
|
||||||
g_io_module_scope_free (scope);
|
g_io_module_scope_free (scope);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user