summaryrefslogtreecommitdiff
path: root/gio/giomodule.c
diff options
context:
space:
mode:
authorA. Walton <awalton@svn.gnome.org>2008-03-28 14:31:09 +0000
committerAndrew Walton <awalton@src.gnome.org>2008-03-28 14:31:09 +0000
commit096201834d4511604775c22c10831d8fd00a7e98 (patch)
tree2068d3ae136c5a0bd7520eac01451ca0a1d34a54 /gio/giomodule.c
parent4824b7dbb072a7d19f579f73bda098713ccbc87a (diff)
Adds GIO_EXTRA_MODULES environment variable support, closing bug #523039.
2008-03-28 A. Walton <awalton@svn.gnome.org> * giomodule.c (_g_io_modules_ensure_loaded): Adds GIO_EXTRA_MODULES environment variable support, closing bug #523039. svn path=/trunk/; revision=6768
Diffstat (limited to 'gio/giomodule.c')
-rw-r--r--gio/giomodule.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gio/giomodule.c b/gio/giomodule.c
index 69210e405..63ff2fac4 100644
--- a/gio/giomodule.c
+++ b/gio/giomodule.c
@@ -300,6 +300,7 @@ _g_io_modules_ensure_loaded (void)
GList *modules, *l;
static gboolean loaded_dirs = FALSE;
GIOExtensionPoint *ep;
+ const char *module_path;
G_LOCK (loaded_dirs);
@@ -329,6 +330,23 @@ _g_io_modules_ensure_loaded (void)
modules = g_io_modules_load_all_in_directory (GIO_MODULE_DIR);
+ module_path = g_getenv ("GIO_EXTRA_MODULES");
+
+ if (module_path)
+ {
+ int i = 0;
+ gchar **paths;
+ paths = g_strsplit (module_path, ":", 0);
+
+ while (paths[i] != NULL)
+ {
+ modules = g_list_prepend (modules, g_io_modules_load_all_in_directory (paths[i]));
+ i++;
+ }
+
+ g_strfreev (paths);
+ }
+
/* Initialize types from built-in "modules" */
#if defined(HAVE_SYS_INOTIFY_H) || defined(HAVE_LINUX_INOTIFY_H)
_g_inotify_directory_monitor_get_type ();