[gegl] bin: improve lua path module loading



commit 006fece95d6f117d6753b1364c7fa5a16a4e8ef9
Author: Øyvind Kolås <pippin gimp org>
Date:   Tue May 28 05:36:33 2019 +0200

    bin: improve lua path module loading

 bin/ui-core.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/bin/ui-core.c b/bin/ui-core.c
index 23ada5ece..c680a7aa0 100644
--- a/bin/ui-core.c
+++ b/bin/ui-core.c
@@ -1370,7 +1370,7 @@ int mrg_ui_main (int argc, char **argv, char **ops)
 
     for (int i = 0; data_dirs[i]; i++)
     {
-      char *script = g_strdup_printf ("package.path = package.path .. ';%s/gegl-0.4/lua/?.lua'\n", 
data_dirs[i]);
+      char *script = g_strdup_printf ("package.path = package.path .. ';%s%sgegl-0.4/lua/?.lua'\n", 
data_dirs[i], data_dirs[i][strlen(data_dirs[i])-1]=='/'?"":"/");
       status = luaL_loadstring(L, script);
       result = lua_pcall(L, 0, LUA_MULTRET, 0);
       if (result){
@@ -5303,6 +5303,8 @@ static cairo_matrix_t node_get_relative_transform (GeglNode *node_view,
   return ret;
 }
 
+
+
 /* given a basename return fully qualified path, searching through
  * posisble locations, return NULL if not found.
  */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]