summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosé Romildo Malaquias <[email protected]>2020-02-11 17:49:13 -0300
committerraveit65 <[email protected]>2022-07-20 23:36:17 +0200
commitedd32134e42cc5845c7bd40bc24b7bf5696518c4 (patch)
treea81eea23c15a10afaf7998a87913425945b386a6
parent274dd1685a85564717d2727bed863c565264f5a3 (diff)
downloadcaja-edd32134e42cc5845c7bd40bc24b7bf5696518c4.tar.bz2
caja-edd32134e42cc5845c7bd40bc24b7bf5696518c4.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.
-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 d7405d4d..e7796739 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);