summaryrefslogtreecommitdiff
path: root/libcaja-private/caja-module.c
diff options
context:
space:
mode:
authorJosé Romildo Malaquias <[email protected]>2020-02-11 17:49:13 -0300
committerraveit65 <[email protected]>2020-02-25 15:45:12 +0100
commitbcd95de76adeb382a25a612abad305e3e931af5a (patch)
tree64a7b4cb8fcae2b41635bd7adb93b658f08ec3e5 /libcaja-private/caja-module.c
parentd52edc1c12a1fe1a806514533b6c47af2a7647ec (diff)
downloadcaja-bcd95de76adeb382a25a612abad305e3e931af5a.tar.bz2
caja-bcd95de76adeb382a25a612abad305e3e931af5a.tar.xz
Look for caja extensions at $CAJA_EXTENSION_DIRS
CAJA_EXTENSION_DIRS is a list of directories where caja extensions are looked for. It is needed for distributions like NixOS that do not install all extensions in the same directory. In NixOS each package is installed in a self contained directory.
Diffstat (limited to 'libcaja-private/caja-module.c')
-rw-r--r--libcaja-private/caja-module.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/libcaja-private/caja-module.c b/libcaja-private/caja-module.c
index d54d7cf1..b023afcf 100644
--- a/libcaja-private/caja-module.c
+++ b/libcaja-private/caja-module.c
@@ -261,8 +261,20 @@ caja_module_setup (void)
if (!initialized)
{
+ const gchar *caja_extension_dirs = g_getenv ("CAJA_EXTENSION_DIRS");
+
initialized = TRUE;
+ if (caja_extension_dirs)
+ {
+ gchar **dir_vector = g_strsplit (caja_extension_dirs, G_SEARCHPATH_SEPARATOR_S, 0);
+
+ for (gchar **dir = dir_vector; *dir != NULL; ++ dir)
+ load_module_dir (*dir);
+
+ g_strfreev(dir_vector);
+ }
+
load_module_dir (CAJA_EXTENSIONDIR);
eel_debug_call_at_shutdown (free_module_objects);